@@ -25,13 +25,13 @@ MODULE_LICENSE("GPL");
2525MODULE_DESCRIPTION ("GPIB driver for Agilent 82350b" );
2626
2727static int read_transfer_counter (struct agilent_82350b_priv * a_priv );
28- static unsigned short read_and_clear_event_status (gpib_board_t * board );
28+ static unsigned short read_and_clear_event_status (struct gpib_board * board );
2929static void set_transfer_counter (struct agilent_82350b_priv * a_priv , int count );
30- static int agilent_82350b_write (gpib_board_t * board , uint8_t * buffer , size_t length , int send_eoi ,
31- size_t * bytes_written );
30+ static int agilent_82350b_write (struct gpib_board * board , uint8_t * buffer ,
31+ size_t length , int send_eoi , size_t * bytes_written );
3232
33- static int agilent_82350b_accel_read (gpib_board_t * board , uint8_t * buffer , size_t length , int * end ,
34- size_t * bytes_read )
33+ static int agilent_82350b_accel_read (struct gpib_board * board , uint8_t * buffer ,
34+ size_t length , int * end , size_t * bytes_read )
3535
3636{
3737 struct agilent_82350b_priv * a_priv = board -> private_data ;
@@ -130,7 +130,7 @@ static int agilent_82350b_accel_read(gpib_board_t *board, uint8_t *buffer, size_
130130 return 0 ;
131131}
132132
133- static int translate_wait_return_value (gpib_board_t * board , int retval )
133+ static int translate_wait_return_value (struct gpib_board * board , int retval )
134134
135135{
136136 struct agilent_82350b_priv * a_priv = board -> private_data ;
@@ -145,8 +145,9 @@ static int translate_wait_return_value(gpib_board_t *board, int retval)
145145 return 0 ;
146146}
147147
148- static int agilent_82350b_accel_write (gpib_board_t * board , uint8_t * buffer , size_t length ,
149- int send_eoi , size_t * bytes_written )
148+ static int agilent_82350b_accel_write (struct gpib_board * board , uint8_t * buffer ,
149+ size_t length , int send_eoi ,
150+ size_t * bytes_written )
150151{
151152 struct agilent_82350b_priv * a_priv = board -> private_data ;
152153 struct tms9914_priv * tms_priv = & a_priv -> tms9914_priv ;
@@ -227,7 +228,7 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size
227228 return 0 ;
228229}
229230
230- static unsigned short read_and_clear_event_status (gpib_board_t * board )
231+ static unsigned short read_and_clear_event_status (struct gpib_board * board )
231232{
232233 struct agilent_82350b_priv * a_priv = board -> private_data ;
233234 unsigned long flags ;
@@ -245,7 +246,7 @@ static irqreturn_t agilent_82350b_interrupt(int irq, void *arg)
245246{
246247 int tms9914_status1 = 0 , tms9914_status2 = 0 ;
247248 int event_status ;
248- gpib_board_t * board = arg ;
249+ struct gpib_board * board = arg ;
249250 struct agilent_82350b_priv * a_priv = board -> private_data ;
250251 unsigned long flags ;
251252 irqreturn_t retval = IRQ_NONE ;
@@ -272,7 +273,7 @@ static irqreturn_t agilent_82350b_interrupt(int irq, void *arg)
272273 return retval ;
273274}
274275
275- static void agilent_82350b_detach (gpib_board_t * board );
276+ static void agilent_82350b_detach (struct gpib_board * board );
276277
277278static int read_transfer_counter (struct agilent_82350b_priv * a_priv )
278279{
@@ -296,50 +297,50 @@ static void set_transfer_counter(struct agilent_82350b_priv *a_priv, int count)
296297}
297298
298299// wrappers for interface functions
299- static int agilent_82350b_read (gpib_board_t * board , uint8_t * buffer , size_t length , int * end ,
300- size_t * bytes_read )
301-
300+ static int agilent_82350b_read (struct gpib_board * board , uint8_t * buffer ,
301+ size_t length , int * end , size_t * bytes_read )
302302{
303303 struct agilent_82350b_priv * priv = board -> private_data ;
304304
305305 return tms9914_read (board , & priv -> tms9914_priv , buffer , length , end , bytes_read );
306306}
307307
308- static int agilent_82350b_write (gpib_board_t * board , uint8_t * buffer , size_t length , int send_eoi ,
309- size_t * bytes_written )
308+ static int agilent_82350b_write (struct gpib_board * board , uint8_t * buffer ,
309+ size_t length , int send_eoi , size_t * bytes_written )
310310
311311{
312312 struct agilent_82350b_priv * priv = board -> private_data ;
313313
314314 return tms9914_write (board , & priv -> tms9914_priv , buffer , length , send_eoi , bytes_written );
315315}
316316
317- static int agilent_82350b_command (gpib_board_t * board , uint8_t * buffer , size_t length ,
318- size_t * bytes_written )
317+ static int agilent_82350b_command (struct gpib_board * board , uint8_t * buffer ,
318+ size_t length , size_t * bytes_written )
319319
320320{
321321 struct agilent_82350b_priv * priv = board -> private_data ;
322322
323323 return tms9914_command (board , & priv -> tms9914_priv , buffer , length , bytes_written );
324324}
325325
326- static int agilent_82350b_take_control (gpib_board_t * board , int synchronous )
326+ static int agilent_82350b_take_control (struct gpib_board * board , int synchronous )
327327
328328{
329329 struct agilent_82350b_priv * priv = board -> private_data ;
330330
331331 return tms9914_take_control_workaround (board , & priv -> tms9914_priv , synchronous );
332332}
333333
334- static int agilent_82350b_go_to_standby (gpib_board_t * board )
334+ static int agilent_82350b_go_to_standby (struct gpib_board * board )
335335
336336{
337337 struct agilent_82350b_priv * priv = board -> private_data ;
338338
339339 return tms9914_go_to_standby (board , & priv -> tms9914_priv );
340340}
341341
342- static void agilent_82350b_request_system_control (gpib_board_t * board , int request_control )
342+ static void agilent_82350b_request_system_control (struct gpib_board * board ,
343+ int request_control )
343344
344345{
345346 struct agilent_82350b_priv * a_priv = board -> private_data ;
@@ -357,99 +358,105 @@ static void agilent_82350b_request_system_control(gpib_board_t *board, int reque
357358 tms9914_request_system_control (board , & a_priv -> tms9914_priv , request_control );
358359}
359360
360- static void agilent_82350b_interface_clear (gpib_board_t * board , int assert )
361+ static void agilent_82350b_interface_clear (struct gpib_board * board , int assert )
361362
362363{
363364 struct agilent_82350b_priv * priv = board -> private_data ;
364365
365366 tms9914_interface_clear (board , & priv -> tms9914_priv , assert );
366367}
367368
368- static void agilent_82350b_remote_enable (gpib_board_t * board , int enable )
369+ static void agilent_82350b_remote_enable (struct gpib_board * board , int enable )
369370{
370371 struct agilent_82350b_priv * priv = board -> private_data ;
371372
372373 tms9914_remote_enable (board , & priv -> tms9914_priv , enable );
373374}
374375
375- static int agilent_82350b_enable_eos (gpib_board_t * board , uint8_t eos_byte , int compare_8_bits )
376+ static int agilent_82350b_enable_eos (struct gpib_board * board , uint8_t eos_byte ,
377+ int compare_8_bits )
376378{
377379 struct agilent_82350b_priv * priv = board -> private_data ;
378380
379381 return tms9914_enable_eos (board , & priv -> tms9914_priv , eos_byte , compare_8_bits );
380382}
381383
382- static void agilent_82350b_disable_eos (gpib_board_t * board )
384+ static void agilent_82350b_disable_eos (struct gpib_board * board )
383385{
384386 struct agilent_82350b_priv * priv = board -> private_data ;
385387
386388 tms9914_disable_eos (board , & priv -> tms9914_priv );
387389}
388390
389- static unsigned int agilent_82350b_update_status (gpib_board_t * board , unsigned int clear_mask )
391+ static unsigned int agilent_82350b_update_status (struct gpib_board * board ,
392+ unsigned int clear_mask )
390393{
391394 struct agilent_82350b_priv * priv = board -> private_data ;
392395
393396 return tms9914_update_status (board , & priv -> tms9914_priv , clear_mask );
394397}
395398
396- static int agilent_82350b_primary_address (gpib_board_t * board , unsigned int address )
399+ static int agilent_82350b_primary_address (struct gpib_board * board ,
400+ unsigned int address )
397401{
398402 struct agilent_82350b_priv * priv = board -> private_data ;
399403
400404 return tms9914_primary_address (board , & priv -> tms9914_priv , address );
401405}
402406
403- static int agilent_82350b_secondary_address (gpib_board_t * board , unsigned int address , int enable )
407+ static int agilent_82350b_secondary_address (struct gpib_board * board ,
408+ unsigned int address , int enable )
404409{
405410 struct agilent_82350b_priv * priv = board -> private_data ;
406411
407412 return tms9914_secondary_address (board , & priv -> tms9914_priv , address , enable );
408413}
409414
410- static int agilent_82350b_parallel_poll (gpib_board_t * board , uint8_t * result )
415+ static int agilent_82350b_parallel_poll (struct gpib_board * board , uint8_t * result )
411416{
412417 struct agilent_82350b_priv * priv = board -> private_data ;
413418
414419 return tms9914_parallel_poll (board , & priv -> tms9914_priv , result );
415420}
416421
417- static void agilent_82350b_parallel_poll_configure (gpib_board_t * board , uint8_t config )
422+ static void agilent_82350b_parallel_poll_configure (struct gpib_board * board ,
423+ uint8_t config )
418424{
419425 struct agilent_82350b_priv * priv = board -> private_data ;
420426
421427 tms9914_parallel_poll_configure (board , & priv -> tms9914_priv , config );
422428}
423429
424- static void agilent_82350b_parallel_poll_response (gpib_board_t * board , int ist )
430+ static void agilent_82350b_parallel_poll_response (struct gpib_board * board , int ist )
425431{
426432 struct agilent_82350b_priv * priv = board -> private_data ;
427433
428434 tms9914_parallel_poll_response (board , & priv -> tms9914_priv , ist );
429435}
430436
431- static void agilent_82350b_serial_poll_response (gpib_board_t * board , uint8_t status )
437+ static void agilent_82350b_serial_poll_response (struct gpib_board * board , uint8_t status )
432438{
433439 struct agilent_82350b_priv * priv = board -> private_data ;
434440
435441 tms9914_serial_poll_response (board , & priv -> tms9914_priv , status );
436442}
437443
438- static uint8_t agilent_82350b_serial_poll_status (gpib_board_t * board )
444+ static uint8_t agilent_82350b_serial_poll_status (struct gpib_board * board )
439445{
440446 struct agilent_82350b_priv * priv = board -> private_data ;
441447
442448 return tms9914_serial_poll_status (board , & priv -> tms9914_priv );
443449}
444450
445- static int agilent_82350b_line_status (const gpib_board_t * board )
451+ static int agilent_82350b_line_status (const struct gpib_board * board )
446452{
447453 struct agilent_82350b_priv * priv = board -> private_data ;
448454
449455 return tms9914_line_status (board , & priv -> tms9914_priv );
450456}
451457
452- static unsigned int agilent_82350b_t1_delay (gpib_board_t * board , unsigned int nanosec )
458+ static unsigned int agilent_82350b_t1_delay (struct gpib_board * board ,
459+ unsigned int nanosec )
453460{
454461 struct agilent_82350b_priv * a_priv = board -> private_data ;
455462 static const int nanosec_per_clock = 30 ;
@@ -464,28 +471,29 @@ static unsigned int agilent_82350b_t1_delay(gpib_board_t *board, unsigned int na
464471 return value * nanosec_per_clock ;
465472}
466473
467- static void agilent_82350b_return_to_local (gpib_board_t * board )
474+ static void agilent_82350b_return_to_local (struct gpib_board * board )
468475{
469476 struct agilent_82350b_priv * priv = board -> private_data ;
470477
471478 tms9914_return_to_local (board , & priv -> tms9914_priv );
472479}
473480
474- static int agilent_82350b_allocate_private (gpib_board_t * board )
481+ static int agilent_82350b_allocate_private (struct gpib_board * board )
475482{
476483 board -> private_data = kzalloc (sizeof (struct agilent_82350b_priv ), GFP_KERNEL );
477484 if (!board -> private_data )
478485 return - ENOMEM ;
479486 return 0 ;
480487}
481488
482- static void agilent_82350b_free_private (gpib_board_t * board )
489+ static void agilent_82350b_free_private (struct gpib_board * board )
483490{
484491 kfree (board -> private_data );
485492 board -> private_data = NULL ;
486493}
487494
488- static int init_82350a_hardware (gpib_board_t * board , const gpib_board_config_t * config )
495+ static int init_82350a_hardware (struct gpib_board * board ,
496+ const gpib_board_config_t * config )
489497{
490498 struct agilent_82350b_priv * a_priv = board -> private_data ;
491499 static const unsigned int firmware_length = 5302 ;
@@ -550,7 +558,7 @@ static int init_82350a_hardware(gpib_board_t *board, const gpib_board_config_t *
550558 return 0 ;
551559}
552560
553- static int test_sram (gpib_board_t * board )
561+ static int test_sram (struct gpib_board * board )
554562
555563{
556564 struct agilent_82350b_priv * a_priv = board -> private_data ;
@@ -579,7 +587,8 @@ static int test_sram(gpib_board_t *board)
579587 return 0 ;
580588}
581589
582- static int agilent_82350b_generic_attach (gpib_board_t * board , const gpib_board_config_t * config ,
590+ static int agilent_82350b_generic_attach (struct gpib_board * board ,
591+ const gpib_board_config_t * config ,
583592 int use_fifos )
584593
585594{
@@ -721,17 +730,19 @@ static int agilent_82350b_generic_attach(gpib_board_t *board, const gpib_board_c
721730 return 0 ;
722731}
723732
724- static int agilent_82350b_unaccel_attach (gpib_board_t * board , const gpib_board_config_t * config )
733+ static int agilent_82350b_unaccel_attach (struct gpib_board * board ,
734+ const gpib_board_config_t * config )
725735{
726736 return agilent_82350b_generic_attach (board , config , 0 );
727737}
728738
729- static int agilent_82350b_accel_attach (gpib_board_t * board , const gpib_board_config_t * config )
739+ static int agilent_82350b_accel_attach (struct gpib_board * board ,
740+ const gpib_board_config_t * config )
730741{
731742 return agilent_82350b_generic_attach (board , config , 1 );
732743}
733744
734- static void agilent_82350b_detach (gpib_board_t * board )
745+ static void agilent_82350b_detach (struct gpib_board * board )
735746{
736747 struct agilent_82350b_priv * a_priv = board -> private_data ;
737748 struct tms9914_priv * tms_priv ;
0 commit comments