@@ -24,7 +24,7 @@ MODULE_DESCRIPTION("GPIB driver for National Instruments USB devices");
2424static struct usb_interface * ni_usb_driver_interfaces [MAX_NUM_NI_USB_INTERFACES ];
2525
2626static int ni_usb_parse_status_block (const u8 * buffer , struct ni_usb_status_block * status );
27- static int ni_usb_set_interrupt_monitor (gpib_board_t * board , unsigned int monitored_bits );
27+ static int ni_usb_set_interrupt_monitor (struct gpib_board * board , unsigned int monitored_bits );
2828static void ni_usb_stop (struct ni_usb_priv * ni_priv );
2929
3030static DEFINE_MUTEX (ni_usb_hotplug_lock );
@@ -310,7 +310,7 @@ static int ni_usb_receive_control_msg(struct ni_usb_priv *ni_priv, __u8 request,
310310 return retval ;
311311}
312312
313- static void ni_usb_soft_update_status (gpib_board_t * board , unsigned int ni_usb_ibsta ,
313+ static void ni_usb_soft_update_status (struct gpib_board * board , unsigned int ni_usb_ibsta ,
314314 unsigned int clear_mask )
315315{
316316 static const unsigned int ni_usb_ibsta_mask = SRQI | ATN | CIC | REM | LACS | TACS | LOK ;
@@ -586,7 +586,7 @@ static int ni_usb_write_registers(struct ni_usb_priv *ni_priv,
586586}
587587
588588// interface functions
589- static int ni_usb_read (gpib_board_t * board , uint8_t * buffer , size_t length ,
589+ static int ni_usb_read (struct gpib_board * board , uint8_t * buffer , size_t length ,
590590 int * end , size_t * bytes_read )
591591{
592592 int retval , parse_retval ;
@@ -716,7 +716,7 @@ static int ni_usb_read(gpib_board_t *board, uint8_t *buffer, size_t length,
716716 return retval ;
717717}
718718
719- static int ni_usb_write (gpib_board_t * board , uint8_t * buffer , size_t length ,
719+ static int ni_usb_write (struct gpib_board * board , uint8_t * buffer , size_t length ,
720720 int send_eoi , size_t * bytes_written )
721721{
722722 int retval ;
@@ -819,7 +819,7 @@ static int ni_usb_write(gpib_board_t *board, uint8_t *buffer, size_t length,
819819 return retval ;
820820}
821821
822- static int ni_usb_command_chunk (gpib_board_t * board , uint8_t * buffer , size_t length ,
822+ static int ni_usb_command_chunk (struct gpib_board * board , uint8_t * buffer , size_t length ,
823823 size_t * command_bytes_written )
824824{
825825 int retval ;
@@ -912,7 +912,7 @@ static int ni_usb_command_chunk(gpib_board_t *board, uint8_t *buffer, size_t len
912912 return 0 ;
913913}
914914
915- static int ni_usb_command (gpib_board_t * board , uint8_t * buffer , size_t length ,
915+ static int ni_usb_command (struct gpib_board * board , uint8_t * buffer , size_t length ,
916916 size_t * bytes_written )
917917{
918918 size_t count ;
@@ -929,7 +929,7 @@ static int ni_usb_command(gpib_board_t *board, uint8_t *buffer, size_t length,
929929 return 0 ;
930930}
931931
932- static int ni_usb_take_control (gpib_board_t * board , int synchronous )
932+ static int ni_usb_take_control (struct gpib_board * board , int synchronous )
933933{
934934 int retval ;
935935 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -990,7 +990,7 @@ static int ni_usb_take_control(gpib_board_t *board, int synchronous)
990990 return retval ;
991991}
992992
993- static int ni_usb_go_to_standby (gpib_board_t * board )
993+ static int ni_usb_go_to_standby (struct gpib_board * board )
994994{
995995 int retval ;
996996 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1049,7 +1049,7 @@ static int ni_usb_go_to_standby(gpib_board_t *board)
10491049 return 0 ;
10501050}
10511051
1052- static void ni_usb_request_system_control (gpib_board_t * board , int request_control )
1052+ static void ni_usb_request_system_control (struct gpib_board * board , int request_control )
10531053{
10541054 int retval ;
10551055 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1100,7 +1100,7 @@ static void ni_usb_request_system_control(gpib_board_t *board, int request_contr
11001100}
11011101
11021102//FIXME maybe the interface should have a "pulse interface clear" function that can return an error?
1103- static void ni_usb_interface_clear (gpib_board_t * board , int assert )
1103+ static void ni_usb_interface_clear (struct gpib_board * board , int assert )
11041104{
11051105 int retval ;
11061106 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1149,7 +1149,7 @@ static void ni_usb_interface_clear(gpib_board_t *board, int assert)
11491149 ni_usb_soft_update_status (board , status .ibsta , 0 );
11501150}
11511151
1152- static void ni_usb_remote_enable (gpib_board_t * board , int enable )
1152+ static void ni_usb_remote_enable (struct gpib_board * board , int enable )
11531153{
11541154 int retval ;
11551155 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1176,7 +1176,7 @@ static void ni_usb_remote_enable(gpib_board_t *board, int enable)
11761176 return ;// 0;
11771177}
11781178
1179- static int ni_usb_enable_eos (gpib_board_t * board , uint8_t eos_byte , int compare_8_bits )
1179+ static int ni_usb_enable_eos (struct gpib_board * board , uint8_t eos_byte , int compare_8_bits )
11801180{
11811181 struct ni_usb_priv * ni_priv = board -> private_data ;
11821182
@@ -1189,7 +1189,7 @@ static int ni_usb_enable_eos(gpib_board_t *board, uint8_t eos_byte, int compare_
11891189 return 0 ;
11901190}
11911191
1192- static void ni_usb_disable_eos (gpib_board_t * board )
1192+ static void ni_usb_disable_eos (struct gpib_board * board )
11931193{
11941194 struct ni_usb_priv * ni_priv = board -> private_data ;
11951195 /* adapter gets unhappy if you don't zero all the bits
@@ -1199,7 +1199,7 @@ static void ni_usb_disable_eos(gpib_board_t *board)
11991199 ni_priv -> eos_char = 0 ;
12001200}
12011201
1202- static unsigned int ni_usb_update_status (gpib_board_t * board , unsigned int clear_mask )
1202+ static unsigned int ni_usb_update_status (struct gpib_board * board , unsigned int clear_mask )
12031203{
12041204 int retval ;
12051205 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1254,7 +1254,7 @@ static void ni_usb_stop(struct ni_usb_priv *ni_priv)
12541254 kfree (buffer );
12551255}
12561256
1257- static int ni_usb_primary_address (gpib_board_t * board , unsigned int address )
1257+ static int ni_usb_primary_address (struct gpib_board * board , unsigned int address )
12581258{
12591259 int retval ;
12601260 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1312,7 +1312,7 @@ static int ni_usb_write_sad(struct ni_usb_register *writes, int address, int ena
13121312 return i ;
13131313}
13141314
1315- static int ni_usb_secondary_address (gpib_board_t * board , unsigned int address , int enable )
1315+ static int ni_usb_secondary_address (struct gpib_board * board , unsigned int address , int enable )
13161316{
13171317 int retval ;
13181318 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1334,7 +1334,7 @@ static int ni_usb_secondary_address(gpib_board_t *board, unsigned int address, i
13341334 return 0 ;
13351335}
13361336
1337- static int ni_usb_parallel_poll (gpib_board_t * board , uint8_t * result )
1337+ static int ni_usb_parallel_poll (struct gpib_board * board , uint8_t * result )
13381338{
13391339 int retval ;
13401340 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1389,7 +1389,7 @@ static int ni_usb_parallel_poll(gpib_board_t *board, uint8_t *result)
13891389 return retval ;
13901390}
13911391
1392- static void ni_usb_parallel_poll_configure (gpib_board_t * board , uint8_t config )
1392+ static void ni_usb_parallel_poll_configure (struct gpib_board * board , uint8_t config )
13931393{
13941394 int retval ;
13951395 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1414,7 +1414,7 @@ static void ni_usb_parallel_poll_configure(gpib_board_t *board, uint8_t config)
14141414 return ;// 0;
14151415}
14161416
1417- static void ni_usb_parallel_poll_response (gpib_board_t * board , int ist )
1417+ static void ni_usb_parallel_poll_response (struct gpib_board * board , int ist )
14181418{
14191419 int retval ;
14201420 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1442,7 +1442,7 @@ static void ni_usb_parallel_poll_response(gpib_board_t *board, int ist)
14421442 return ;// 0;
14431443}
14441444
1445- static void ni_usb_serial_poll_response (gpib_board_t * board , u8 status )
1445+ static void ni_usb_serial_poll_response (struct gpib_board * board , u8 status )
14461446{
14471447 int retval ;
14481448 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1467,12 +1467,12 @@ static void ni_usb_serial_poll_response(gpib_board_t *board, u8 status)
14671467 return ;// 0;
14681468}
14691469
1470- static uint8_t ni_usb_serial_poll_status (gpib_board_t * board )
1470+ static uint8_t ni_usb_serial_poll_status (struct gpib_board * board )
14711471{
14721472 return 0 ;
14731473}
14741474
1475- static void ni_usb_return_to_local (gpib_board_t * board )
1475+ static void ni_usb_return_to_local (struct gpib_board * board )
14761476{
14771477 int retval ;
14781478 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1497,7 +1497,7 @@ static void ni_usb_return_to_local(gpib_board_t *board)
14971497 return ;// 0;
14981498}
14991499
1500- static int ni_usb_line_status (const gpib_board_t * board )
1500+ static int ni_usb_line_status (const struct gpib_board * board )
15011501{
15021502 int retval ;
15031503 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1616,7 +1616,7 @@ static int ni_usb_setup_t1_delay(struct ni_usb_register *reg, unsigned int nano_
16161616 return i ;
16171617}
16181618
1619- static unsigned int ni_usb_t1_delay (gpib_board_t * board , unsigned int nano_sec )
1619+ static unsigned int ni_usb_t1_delay (struct gpib_board * board , unsigned int nano_sec )
16201620{
16211621 int retval ;
16221622 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1640,7 +1640,7 @@ static unsigned int ni_usb_t1_delay(gpib_board_t *board, unsigned int nano_sec)
16401640 return actual_ns ;
16411641}
16421642
1643- static int ni_usb_allocate_private (gpib_board_t * board )
1643+ static int ni_usb_allocate_private (struct gpib_board * board )
16441644{
16451645 struct ni_usb_priv * ni_priv ;
16461646
@@ -1663,7 +1663,7 @@ static void ni_usb_free_private(struct ni_usb_priv *ni_priv)
16631663}
16641664
16651665#define NUM_INIT_WRITES 26
1666- static int ni_usb_setup_init (gpib_board_t * board , struct ni_usb_register * writes )
1666+ static int ni_usb_setup_init (struct gpib_board * board , struct ni_usb_register * writes )
16671667{
16681668 struct ni_usb_priv * ni_priv = board -> private_data ;
16691669 struct usb_device * usb_dev = interface_to_usbdev (ni_priv -> bus_interface );
@@ -1770,7 +1770,7 @@ static int ni_usb_setup_init(gpib_board_t *board, struct ni_usb_register *writes
17701770 return i ;
17711771}
17721772
1773- static int ni_usb_init (gpib_board_t * board )
1773+ static int ni_usb_init (struct gpib_board * board )
17741774{
17751775 int retval ;
17761776 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1799,7 +1799,7 @@ static int ni_usb_init(gpib_board_t *board)
17991799
18001800static void ni_usb_interrupt_complete (struct urb * urb )
18011801{
1802- gpib_board_t * board = urb -> context ;
1802+ struct gpib_board * board = urb -> context ;
18031803 struct ni_usb_priv * ni_priv = board -> private_data ;
18041804 struct usb_device * usb_dev = interface_to_usbdev (ni_priv -> bus_interface );
18051805 int retval ;
@@ -1835,7 +1835,7 @@ static void ni_usb_interrupt_complete(struct urb *urb)
18351835 dev_err (& usb_dev -> dev , "failed to resubmit interrupt urb\n" );
18361836}
18371837
1838- static int ni_usb_set_interrupt_monitor (gpib_board_t * board , unsigned int monitored_bits )
1838+ static int ni_usb_set_interrupt_monitor (struct gpib_board * board , unsigned int monitored_bits )
18391839{
18401840 int retval ;
18411841 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1866,7 +1866,7 @@ static int ni_usb_set_interrupt_monitor(gpib_board_t *board, unsigned int monito
18661866 return 0 ;
18671867}
18681868
1869- static int ni_usb_setup_urbs (gpib_board_t * board )
1869+ static int ni_usb_setup_urbs (struct gpib_board * board )
18701870{
18711871 struct ni_usb_priv * ni_priv = board -> private_data ;
18721872 struct usb_device * usb_dev ;
@@ -2205,7 +2205,7 @@ static inline int ni_usb_device_match(struct usb_interface *interface,
22052205 return 1 ;
22062206}
22072207
2208- static int ni_usb_attach (gpib_board_t * board , const gpib_board_config_t * config )
2208+ static int ni_usb_attach (struct gpib_board * board , const gpib_board_config_t * config )
22092209{
22102210 int retval ;
22112211 int i , index ;
@@ -2338,7 +2338,7 @@ static int ni_usb_shutdown_hardware(struct ni_usb_priv *ni_priv)
23382338 return 0 ;
23392339}
23402340
2341- static void ni_usb_detach (gpib_board_t * board )
2341+ static void ni_usb_detach (struct gpib_board * board )
23422342{
23432343 struct ni_usb_priv * ni_priv ;
23442344
@@ -2445,7 +2445,7 @@ static void ni_usb_driver_disconnect(struct usb_interface *interface)
24452445 mutex_lock (& ni_usb_hotplug_lock );
24462446 for (i = 0 ; i < MAX_NUM_NI_USB_INTERFACES ; i ++ ) {
24472447 if (ni_usb_driver_interfaces [i ] == interface ) {
2448- gpib_board_t * board = usb_get_intfdata (interface );
2448+ struct gpib_board * board = usb_get_intfdata (interface );
24492449
24502450 if (board ) {
24512451 struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -2474,7 +2474,7 @@ static void ni_usb_driver_disconnect(struct usb_interface *interface)
24742474static int ni_usb_driver_suspend (struct usb_interface * interface , pm_message_t message )
24752475{
24762476 struct usb_device * usb_dev = interface_to_usbdev (interface );
2477- gpib_board_t * board ;
2477+ struct gpib_board * board ;
24782478 int i , retval ;
24792479
24802480 mutex_lock (& ni_usb_hotplug_lock );
@@ -2518,7 +2518,7 @@ static int ni_usb_driver_resume(struct usb_interface *interface)
25182518{
25192519 struct usb_device * usb_dev = interface_to_usbdev (interface );
25202520
2521- gpib_board_t * board ;
2521+ struct gpib_board * board ;
25222522 int i , retval ;
25232523
25242524 mutex_lock (& ni_usb_hotplug_lock );
0 commit comments