22
22
MODULE_LICENSE ("GPL" );
23
23
MODULE_DESCRIPTION ("GPIB driver for hp 82341a/b/c/d boards" );
24
24
25
- static unsigned short read_and_clear_event_status (gpib_board_t * board );
25
+ static unsigned short read_and_clear_event_status (struct gpib_board * board );
26
26
static void set_transfer_counter (struct hp_82341_priv * hp_priv , int count );
27
27
static int read_transfer_counter (struct hp_82341_priv * hp_priv );
28
- static int hp_82341_write (gpib_board_t * board , uint8_t * buffer , size_t length , int send_eoi ,
28
+ static int hp_82341_write (struct gpib_board * board , uint8_t * buffer , size_t length , int send_eoi ,
29
29
size_t * bytes_written );
30
30
static irqreturn_t hp_82341_interrupt (int irq , void * arg );
31
31
32
- static int hp_82341_accel_read (gpib_board_t * board , uint8_t * buffer , size_t length , int * end ,
32
+ static int hp_82341_accel_read (struct gpib_board * board , uint8_t * buffer , size_t length , int * end ,
33
33
size_t * bytes_read )
34
34
{
35
35
struct hp_82341_priv * hp_priv = board -> private_data ;
@@ -147,7 +147,7 @@ static int hp_82341_accel_read(gpib_board_t *board, uint8_t *buffer, size_t leng
147
147
return 0 ;
148
148
}
149
149
150
- static int restart_write_fifo (gpib_board_t * board , struct hp_82341_priv * hp_priv )
150
+ static int restart_write_fifo (struct gpib_board * board , struct hp_82341_priv * hp_priv )
151
151
{
152
152
struct tms9914_priv * tms_priv = & hp_priv -> tms9914_priv ;
153
153
@@ -172,7 +172,7 @@ static int restart_write_fifo(gpib_board_t *board, struct hp_82341_priv *hp_priv
172
172
return 0 ;
173
173
}
174
174
175
- static int hp_82341_accel_write (gpib_board_t * board , uint8_t * buffer , size_t length ,
175
+ static int hp_82341_accel_write (struct gpib_board * board , uint8_t * buffer , size_t length ,
176
176
int send_eoi , size_t * bytes_written )
177
177
{
178
178
struct hp_82341_priv * hp_priv = board -> private_data ;
@@ -250,50 +250,50 @@ static int hp_82341_accel_write(gpib_board_t *board, uint8_t *buffer, size_t len
250
250
return 0 ;
251
251
}
252
252
253
- static int hp_82341_attach (gpib_board_t * board , const gpib_board_config_t * config );
253
+ static int hp_82341_attach (struct gpib_board * board , const gpib_board_config_t * config );
254
254
255
- static void hp_82341_detach (gpib_board_t * board );
255
+ static void hp_82341_detach (struct gpib_board * board );
256
256
257
257
// wrappers for interface functions
258
- static int hp_82341_read (gpib_board_t * board , uint8_t * buffer , size_t length , int * end ,
258
+ static int hp_82341_read (struct gpib_board * board , uint8_t * buffer , size_t length , int * end ,
259
259
size_t * bytes_read )
260
260
{
261
261
struct hp_82341_priv * priv = board -> private_data ;
262
262
263
263
return tms9914_read (board , & priv -> tms9914_priv , buffer , length , end , bytes_read );
264
264
}
265
265
266
- static int hp_82341_write (gpib_board_t * board , uint8_t * buffer , size_t length , int send_eoi ,
266
+ static int hp_82341_write (struct gpib_board * board , uint8_t * buffer , size_t length , int send_eoi ,
267
267
size_t * bytes_written )
268
268
{
269
269
struct hp_82341_priv * priv = board -> private_data ;
270
270
271
271
return tms9914_write (board , & priv -> tms9914_priv , buffer , length , send_eoi , bytes_written );
272
272
}
273
273
274
- static int hp_82341_command (gpib_board_t * board , uint8_t * buffer , size_t length ,
274
+ static int hp_82341_command (struct gpib_board * board , uint8_t * buffer , size_t length ,
275
275
size_t * bytes_written )
276
276
{
277
277
struct hp_82341_priv * priv = board -> private_data ;
278
278
279
279
return tms9914_command (board , & priv -> tms9914_priv , buffer , length , bytes_written );
280
280
}
281
281
282
- static int hp_82341_take_control (gpib_board_t * board , int synchronous )
282
+ static int hp_82341_take_control (struct gpib_board * board , int synchronous )
283
283
{
284
284
struct hp_82341_priv * priv = board -> private_data ;
285
285
286
286
return tms9914_take_control (board , & priv -> tms9914_priv , synchronous );
287
287
}
288
288
289
- static int hp_82341_go_to_standby (gpib_board_t * board )
289
+ static int hp_82341_go_to_standby (struct gpib_board * board )
290
290
{
291
291
struct hp_82341_priv * priv = board -> private_data ;
292
292
293
293
return tms9914_go_to_standby (board , & priv -> tms9914_priv );
294
294
}
295
295
296
- static void hp_82341_request_system_control (gpib_board_t * board , int request_control )
296
+ static void hp_82341_request_system_control (struct gpib_board * board , int request_control )
297
297
{
298
298
struct hp_82341_priv * priv = board -> private_data ;
299
299
@@ -305,105 +305,105 @@ static void hp_82341_request_system_control(gpib_board_t *board, int request_con
305
305
tms9914_request_system_control (board , & priv -> tms9914_priv , request_control );
306
306
}
307
307
308
- static void hp_82341_interface_clear (gpib_board_t * board , int assert )
308
+ static void hp_82341_interface_clear (struct gpib_board * board , int assert )
309
309
{
310
310
struct hp_82341_priv * priv = board -> private_data ;
311
311
312
312
tms9914_interface_clear (board , & priv -> tms9914_priv , assert );
313
313
}
314
314
315
- static void hp_82341_remote_enable (gpib_board_t * board , int enable )
315
+ static void hp_82341_remote_enable (struct gpib_board * board , int enable )
316
316
{
317
317
struct hp_82341_priv * priv = board -> private_data ;
318
318
319
319
tms9914_remote_enable (board , & priv -> tms9914_priv , enable );
320
320
}
321
321
322
- static int hp_82341_enable_eos (gpib_board_t * board , uint8_t eos_byte , int compare_8_bits )
322
+ static int hp_82341_enable_eos (struct gpib_board * board , uint8_t eos_byte , int compare_8_bits )
323
323
{
324
324
struct hp_82341_priv * priv = board -> private_data ;
325
325
326
326
return tms9914_enable_eos (board , & priv -> tms9914_priv , eos_byte , compare_8_bits );
327
327
}
328
328
329
- static void hp_82341_disable_eos (gpib_board_t * board )
329
+ static void hp_82341_disable_eos (struct gpib_board * board )
330
330
{
331
331
struct hp_82341_priv * priv = board -> private_data ;
332
332
333
333
tms9914_disable_eos (board , & priv -> tms9914_priv );
334
334
}
335
335
336
- static unsigned int hp_82341_update_status (gpib_board_t * board , unsigned int clear_mask )
336
+ static unsigned int hp_82341_update_status (struct gpib_board * board , unsigned int clear_mask )
337
337
{
338
338
struct hp_82341_priv * priv = board -> private_data ;
339
339
340
340
return tms9914_update_status (board , & priv -> tms9914_priv , clear_mask );
341
341
}
342
342
343
- static int hp_82341_primary_address (gpib_board_t * board , unsigned int address )
343
+ static int hp_82341_primary_address (struct gpib_board * board , unsigned int address )
344
344
{
345
345
struct hp_82341_priv * priv = board -> private_data ;
346
346
347
347
return tms9914_primary_address (board , & priv -> tms9914_priv , address );
348
348
}
349
349
350
- static int hp_82341_secondary_address (gpib_board_t * board , unsigned int address , int enable )
350
+ static int hp_82341_secondary_address (struct gpib_board * board , unsigned int address , int enable )
351
351
{
352
352
struct hp_82341_priv * priv = board -> private_data ;
353
353
354
354
return tms9914_secondary_address (board , & priv -> tms9914_priv , address , enable );
355
355
}
356
356
357
- static int hp_82341_parallel_poll (gpib_board_t * board , uint8_t * result )
357
+ static int hp_82341_parallel_poll (struct gpib_board * board , uint8_t * result )
358
358
{
359
359
struct hp_82341_priv * priv = board -> private_data ;
360
360
361
361
return tms9914_parallel_poll (board , & priv -> tms9914_priv , result );
362
362
}
363
363
364
- static void hp_82341_parallel_poll_configure (gpib_board_t * board , uint8_t config )
364
+ static void hp_82341_parallel_poll_configure (struct gpib_board * board , uint8_t config )
365
365
{
366
366
struct hp_82341_priv * priv = board -> private_data ;
367
367
368
368
tms9914_parallel_poll_configure (board , & priv -> tms9914_priv , config );
369
369
}
370
370
371
- static void hp_82341_parallel_poll_response (gpib_board_t * board , int ist )
371
+ static void hp_82341_parallel_poll_response (struct gpib_board * board , int ist )
372
372
{
373
373
struct hp_82341_priv * priv = board -> private_data ;
374
374
375
375
tms9914_parallel_poll_response (board , & priv -> tms9914_priv , ist );
376
376
}
377
377
378
- static void hp_82341_serial_poll_response (gpib_board_t * board , uint8_t status )
378
+ static void hp_82341_serial_poll_response (struct gpib_board * board , uint8_t status )
379
379
{
380
380
struct hp_82341_priv * priv = board -> private_data ;
381
381
382
382
tms9914_serial_poll_response (board , & priv -> tms9914_priv , status );
383
383
}
384
384
385
- static uint8_t hp_82341_serial_poll_status (gpib_board_t * board )
385
+ static uint8_t hp_82341_serial_poll_status (struct gpib_board * board )
386
386
{
387
387
struct hp_82341_priv * priv = board -> private_data ;
388
388
389
389
return tms9914_serial_poll_status (board , & priv -> tms9914_priv );
390
390
}
391
391
392
- static int hp_82341_line_status (const gpib_board_t * board )
392
+ static int hp_82341_line_status (const struct gpib_board * board )
393
393
{
394
394
struct hp_82341_priv * priv = board -> private_data ;
395
395
396
396
return tms9914_line_status (board , & priv -> tms9914_priv );
397
397
}
398
398
399
- static unsigned int hp_82341_t1_delay (gpib_board_t * board , unsigned int nano_sec )
399
+ static unsigned int hp_82341_t1_delay (struct gpib_board * board , unsigned int nano_sec )
400
400
{
401
401
struct hp_82341_priv * priv = board -> private_data ;
402
402
403
403
return tms9914_t1_delay (board , & priv -> tms9914_priv , nano_sec );
404
404
}
405
405
406
- static void hp_82341_return_to_local (gpib_board_t * board )
406
+ static void hp_82341_return_to_local (struct gpib_board * board )
407
407
{
408
408
struct hp_82341_priv * priv = board -> private_data ;
409
409
@@ -465,15 +465,15 @@ static gpib_interface_t hp_82341_interface = {
465
465
.return_to_local = hp_82341_return_to_local ,
466
466
};
467
467
468
- static int hp_82341_allocate_private (gpib_board_t * board )
468
+ static int hp_82341_allocate_private (struct gpib_board * board )
469
469
{
470
470
board -> private_data = kzalloc (sizeof (struct hp_82341_priv ), GFP_KERNEL );
471
471
if (!board -> private_data )
472
472
return - ENOMEM ;
473
473
return 0 ;
474
474
}
475
475
476
- static void hp_82341_free_private (gpib_board_t * board )
476
+ static void hp_82341_free_private (struct gpib_board * board )
477
477
{
478
478
kfree (board -> private_data );
479
479
board -> private_data = NULL ;
@@ -686,7 +686,7 @@ static int clear_xilinx(struct hp_82341_priv *hp_priv)
686
686
return 0 ;
687
687
}
688
688
689
- static int hp_82341_attach (gpib_board_t * board , const gpib_board_config_t * config )
689
+ static int hp_82341_attach (struct gpib_board * board , const gpib_board_config_t * config )
690
690
{
691
691
struct hp_82341_priv * hp_priv ;
692
692
struct tms9914_priv * tms_priv ;
@@ -778,7 +778,7 @@ static int hp_82341_attach(gpib_board_t *board, const gpib_board_config_t *confi
778
778
return 0 ;
779
779
}
780
780
781
- static void hp_82341_detach (gpib_board_t * board )
781
+ static void hp_82341_detach (struct gpib_board * board )
782
782
{
783
783
struct hp_82341_priv * hp_priv = board -> private_data ;
784
784
struct tms9914_priv * tms_priv ;
@@ -844,7 +844,7 @@ module_exit(hp_82341_exit_module);
844
844
/*
845
845
* GPIB interrupt service routines
846
846
*/
847
- static unsigned short read_and_clear_event_status (gpib_board_t * board )
847
+ static unsigned short read_and_clear_event_status (struct gpib_board * board )
848
848
{
849
849
struct hp_82341_priv * hp_priv = board -> private_data ;
850
850
unsigned long flags ;
@@ -860,7 +860,7 @@ static unsigned short read_and_clear_event_status(gpib_board_t *board)
860
860
static irqreturn_t hp_82341_interrupt (int irq , void * arg )
861
861
{
862
862
int status1 , status2 ;
863
- gpib_board_t * board = arg ;
863
+ struct gpib_board * board = arg ;
864
864
struct hp_82341_priv * hp_priv = board -> private_data ;
865
865
struct tms9914_priv * tms_priv = & hp_priv -> tms9914_priv ;
866
866
unsigned long flags ;
0 commit comments