@@ -58,7 +58,7 @@ MODULE_DESCRIPTION("GPIB driver for PC2/PC2a and compatible devices");
58
58
59
59
irqreturn_t pc2_interrupt (int irq , void * arg )
60
60
{
61
- gpib_board_t * board = arg ;
61
+ struct gpib_board * board = arg ;
62
62
struct pc2_priv * priv = board -> private_data ;
63
63
unsigned long flags ;
64
64
irqreturn_t retval ;
@@ -71,7 +71,7 @@ irqreturn_t pc2_interrupt(int irq, void *arg)
71
71
72
72
irqreturn_t pc2a_interrupt (int irq , void * arg )
73
73
{
74
- gpib_board_t * board = arg ;
74
+ struct gpib_board * board = arg ;
75
75
struct pc2_priv * priv = board -> private_data ;
76
76
int status1 , status2 ;
77
77
unsigned long flags ;
@@ -90,149 +90,149 @@ irqreturn_t pc2a_interrupt(int irq, void *arg)
90
90
}
91
91
92
92
// wrappers for interface functions
93
- static int pc2_read (gpib_board_t * board , uint8_t * buffer , size_t length , int * end ,
93
+ static int pc2_read (struct gpib_board * board , uint8_t * buffer , size_t length , int * end ,
94
94
size_t * bytes_read )
95
95
{
96
96
struct pc2_priv * priv = board -> private_data ;
97
97
98
98
return nec7210_read (board , & priv -> nec7210_priv , buffer , length , end , bytes_read );
99
99
}
100
100
101
- static int pc2_write (gpib_board_t * board , uint8_t * buffer , size_t length , int send_eoi ,
101
+ static int pc2_write (struct gpib_board * board , uint8_t * buffer , size_t length , int send_eoi ,
102
102
size_t * bytes_written )
103
103
{
104
104
struct pc2_priv * priv = board -> private_data ;
105
105
106
106
return nec7210_write (board , & priv -> nec7210_priv , buffer , length , send_eoi , bytes_written );
107
107
}
108
108
109
- static int pc2_command (gpib_board_t * board , uint8_t * buffer , size_t length , size_t * bytes_written )
109
+ static int pc2_command (struct gpib_board * board , uint8_t * buffer , size_t length , size_t * bytes_written )
110
110
{
111
111
struct pc2_priv * priv = board -> private_data ;
112
112
113
113
return nec7210_command (board , & priv -> nec7210_priv , buffer , length , bytes_written );
114
114
}
115
115
116
- static int pc2_take_control (gpib_board_t * board , int synchronous )
116
+ static int pc2_take_control (struct gpib_board * board , int synchronous )
117
117
{
118
118
struct pc2_priv * priv = board -> private_data ;
119
119
120
120
return nec7210_take_control (board , & priv -> nec7210_priv , synchronous );
121
121
}
122
122
123
- static int pc2_go_to_standby (gpib_board_t * board )
123
+ static int pc2_go_to_standby (struct gpib_board * board )
124
124
{
125
125
struct pc2_priv * priv = board -> private_data ;
126
126
127
127
return nec7210_go_to_standby (board , & priv -> nec7210_priv );
128
128
}
129
129
130
- static void pc2_request_system_control (gpib_board_t * board , int request_control )
130
+ static void pc2_request_system_control (struct gpib_board * board , int request_control )
131
131
{
132
132
struct pc2_priv * priv = board -> private_data ;
133
133
134
134
nec7210_request_system_control (board , & priv -> nec7210_priv , request_control );
135
135
}
136
136
137
- static void pc2_interface_clear (gpib_board_t * board , int assert )
137
+ static void pc2_interface_clear (struct gpib_board * board , int assert )
138
138
{
139
139
struct pc2_priv * priv = board -> private_data ;
140
140
141
141
nec7210_interface_clear (board , & priv -> nec7210_priv , assert );
142
142
}
143
143
144
- static void pc2_remote_enable (gpib_board_t * board , int enable )
144
+ static void pc2_remote_enable (struct gpib_board * board , int enable )
145
145
{
146
146
struct pc2_priv * priv = board -> private_data ;
147
147
148
148
nec7210_remote_enable (board , & priv -> nec7210_priv , enable );
149
149
}
150
150
151
- static int pc2_enable_eos (gpib_board_t * board , uint8_t eos_byte , int compare_8_bits )
151
+ static int pc2_enable_eos (struct gpib_board * board , uint8_t eos_byte , int compare_8_bits )
152
152
{
153
153
struct pc2_priv * priv = board -> private_data ;
154
154
155
155
return nec7210_enable_eos (board , & priv -> nec7210_priv , eos_byte , compare_8_bits );
156
156
}
157
157
158
- static void pc2_disable_eos (gpib_board_t * board )
158
+ static void pc2_disable_eos (struct gpib_board * board )
159
159
{
160
160
struct pc2_priv * priv = board -> private_data ;
161
161
162
162
nec7210_disable_eos (board , & priv -> nec7210_priv );
163
163
}
164
164
165
- static unsigned int pc2_update_status (gpib_board_t * board , unsigned int clear_mask )
165
+ static unsigned int pc2_update_status (struct gpib_board * board , unsigned int clear_mask )
166
166
{
167
167
struct pc2_priv * priv = board -> private_data ;
168
168
169
169
return nec7210_update_status (board , & priv -> nec7210_priv , clear_mask );
170
170
}
171
171
172
- static int pc2_primary_address (gpib_board_t * board , unsigned int address )
172
+ static int pc2_primary_address (struct gpib_board * board , unsigned int address )
173
173
{
174
174
struct pc2_priv * priv = board -> private_data ;
175
175
176
176
return nec7210_primary_address (board , & priv -> nec7210_priv , address );
177
177
}
178
178
179
- static int pc2_secondary_address (gpib_board_t * board , unsigned int address , int enable )
179
+ static int pc2_secondary_address (struct gpib_board * board , unsigned int address , int enable )
180
180
{
181
181
struct pc2_priv * priv = board -> private_data ;
182
182
183
183
return nec7210_secondary_address (board , & priv -> nec7210_priv , address , enable );
184
184
}
185
185
186
- static int pc2_parallel_poll (gpib_board_t * board , uint8_t * result )
186
+ static int pc2_parallel_poll (struct gpib_board * board , uint8_t * result )
187
187
{
188
188
struct pc2_priv * priv = board -> private_data ;
189
189
190
190
return nec7210_parallel_poll (board , & priv -> nec7210_priv , result );
191
191
}
192
192
193
- static void pc2_parallel_poll_configure (gpib_board_t * board , uint8_t config )
193
+ static void pc2_parallel_poll_configure (struct gpib_board * board , uint8_t config )
194
194
{
195
195
struct pc2_priv * priv = board -> private_data ;
196
196
197
197
nec7210_parallel_poll_configure (board , & priv -> nec7210_priv , config );
198
198
}
199
199
200
- static void pc2_parallel_poll_response (gpib_board_t * board , int ist )
200
+ static void pc2_parallel_poll_response (struct gpib_board * board , int ist )
201
201
{
202
202
struct pc2_priv * priv = board -> private_data ;
203
203
204
204
nec7210_parallel_poll_response (board , & priv -> nec7210_priv , ist );
205
205
}
206
206
207
- static void pc2_serial_poll_response (gpib_board_t * board , uint8_t status )
207
+ static void pc2_serial_poll_response (struct gpib_board * board , uint8_t status )
208
208
{
209
209
struct pc2_priv * priv = board -> private_data ;
210
210
211
211
nec7210_serial_poll_response (board , & priv -> nec7210_priv , status );
212
212
}
213
213
214
- static uint8_t pc2_serial_poll_status (gpib_board_t * board )
214
+ static uint8_t pc2_serial_poll_status (struct gpib_board * board )
215
215
{
216
216
struct pc2_priv * priv = board -> private_data ;
217
217
218
218
return nec7210_serial_poll_status (board , & priv -> nec7210_priv );
219
219
}
220
220
221
- static unsigned int pc2_t1_delay (gpib_board_t * board , unsigned int nano_sec )
221
+ static unsigned int pc2_t1_delay (struct gpib_board * board , unsigned int nano_sec )
222
222
{
223
223
struct pc2_priv * priv = board -> private_data ;
224
224
225
225
return nec7210_t1_delay (board , & priv -> nec7210_priv , nano_sec );
226
226
}
227
227
228
- static void pc2_return_to_local (gpib_board_t * board )
228
+ static void pc2_return_to_local (struct gpib_board * board )
229
229
{
230
230
struct pc2_priv * priv = board -> private_data ;
231
231
232
232
nec7210_return_to_local (board , & priv -> nec7210_priv );
233
233
}
234
234
235
- static int allocate_private (gpib_board_t * board )
235
+ static int allocate_private (struct gpib_board * board )
236
236
{
237
237
struct pc2_priv * priv ;
238
238
@@ -245,13 +245,13 @@ static int allocate_private(gpib_board_t *board)
245
245
return 0 ;
246
246
}
247
247
248
- static void free_private (gpib_board_t * board )
248
+ static void free_private (struct gpib_board * board )
249
249
{
250
250
kfree (board -> private_data );
251
251
board -> private_data = NULL ;
252
252
}
253
253
254
- static int pc2_generic_attach (gpib_board_t * board , const gpib_board_config_t * config ,
254
+ static int pc2_generic_attach (struct gpib_board * board , const gpib_board_config_t * config ,
255
255
enum nec7210_chipset chipset )
256
256
{
257
257
struct pc2_priv * pc2_priv ;
@@ -294,7 +294,7 @@ static int pc2_generic_attach(gpib_board_t *board, const gpib_board_config_t *co
294
294
return 0 ;
295
295
}
296
296
297
- static int pc2_attach (gpib_board_t * board , const gpib_board_config_t * config )
297
+ static int pc2_attach (struct gpib_board * board , const gpib_board_config_t * config )
298
298
{
299
299
int isr_flags = 0 ;
300
300
struct pc2_priv * pc2_priv ;
@@ -338,7 +338,7 @@ static int pc2_attach(gpib_board_t *board, const gpib_board_config_t *config)
338
338
return 0 ;
339
339
}
340
340
341
- static void pc2_detach (gpib_board_t * board )
341
+ static void pc2_detach (struct gpib_board * board )
342
342
{
343
343
struct pc2_priv * pc2_priv = board -> private_data ;
344
344
struct nec7210_priv * nec_priv ;
@@ -365,7 +365,7 @@ static void pc2_detach(gpib_board_t *board)
365
365
free_private (board );
366
366
}
367
367
368
- static int pc2a_common_attach (gpib_board_t * board , const gpib_board_config_t * config ,
368
+ static int pc2a_common_attach (struct gpib_board * board , const gpib_board_config_t * config ,
369
369
unsigned int num_registers , enum nec7210_chipset chipset )
370
370
{
371
371
unsigned int i , j ;
@@ -459,22 +459,22 @@ static int pc2a_common_attach(gpib_board_t *board, const gpib_board_config_t *co
459
459
return 0 ;
460
460
}
461
461
462
- static int pc2a_attach (gpib_board_t * board , const gpib_board_config_t * config )
462
+ static int pc2a_attach (struct gpib_board * board , const gpib_board_config_t * config )
463
463
{
464
464
return pc2a_common_attach (board , config , pc2a_iosize , NEC7210 );
465
465
}
466
466
467
- static int pc2a_cb7210_attach (gpib_board_t * board , const gpib_board_config_t * config )
467
+ static int pc2a_cb7210_attach (struct gpib_board * board , const gpib_board_config_t * config )
468
468
{
469
469
return pc2a_common_attach (board , config , pc2a_iosize , CB7210 );
470
470
}
471
471
472
- static int pc2_2a_attach (gpib_board_t * board , const gpib_board_config_t * config )
472
+ static int pc2_2a_attach (struct gpib_board * board , const gpib_board_config_t * config )
473
473
{
474
474
return pc2a_common_attach (board , config , pc2_2a_iosize , NAT4882 );
475
475
}
476
476
477
- static void pc2a_common_detach (gpib_board_t * board , unsigned int num_registers )
477
+ static void pc2a_common_detach (struct gpib_board * board , unsigned int num_registers )
478
478
{
479
479
int i ;
480
480
struct pc2_priv * pc2_priv = board -> private_data ;
@@ -507,12 +507,12 @@ static void pc2a_common_detach(gpib_board_t *board, unsigned int num_registers)
507
507
free_private (board );
508
508
}
509
509
510
- static void pc2a_detach (gpib_board_t * board )
510
+ static void pc2a_detach (struct gpib_board * board )
511
511
{
512
512
pc2a_common_detach (board , pc2a_iosize );
513
513
}
514
514
515
- static void pc2_2a_detach (gpib_board_t * board )
515
+ static void pc2_2a_detach (struct gpib_board * board )
516
516
{
517
517
pc2a_common_detach (board , pc2_2a_iosize );
518
518
}
0 commit comments