@@ -24,7 +24,7 @@ MODULE_DESCRIPTION("GPIB driver for National Instruments USB devices");
24
24
static struct usb_interface * ni_usb_driver_interfaces [MAX_NUM_NI_USB_INTERFACES ];
25
25
26
26
static 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 );
28
28
static void ni_usb_stop (struct ni_usb_priv * ni_priv );
29
29
30
30
static 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,
310
310
return retval ;
311
311
}
312
312
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 ,
314
314
unsigned int clear_mask )
315
315
{
316
316
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,
586
586
}
587
587
588
588
// 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 ,
590
590
int * end , size_t * bytes_read )
591
591
{
592
592
int retval , parse_retval ;
@@ -716,7 +716,7 @@ static int ni_usb_read(gpib_board_t *board, uint8_t *buffer, size_t length,
716
716
return retval ;
717
717
}
718
718
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 ,
720
720
int send_eoi , size_t * bytes_written )
721
721
{
722
722
int retval ;
@@ -819,7 +819,7 @@ static int ni_usb_write(gpib_board_t *board, uint8_t *buffer, size_t length,
819
819
return retval ;
820
820
}
821
821
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 ,
823
823
size_t * command_bytes_written )
824
824
{
825
825
int retval ;
@@ -912,7 +912,7 @@ static int ni_usb_command_chunk(gpib_board_t *board, uint8_t *buffer, size_t len
912
912
return 0 ;
913
913
}
914
914
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 ,
916
916
size_t * bytes_written )
917
917
{
918
918
size_t count ;
@@ -929,7 +929,7 @@ static int ni_usb_command(gpib_board_t *board, uint8_t *buffer, size_t length,
929
929
return 0 ;
930
930
}
931
931
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 )
933
933
{
934
934
int retval ;
935
935
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)
990
990
return retval ;
991
991
}
992
992
993
- static int ni_usb_go_to_standby (gpib_board_t * board )
993
+ static int ni_usb_go_to_standby (struct gpib_board * board )
994
994
{
995
995
int retval ;
996
996
struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1049,7 +1049,7 @@ static int ni_usb_go_to_standby(gpib_board_t *board)
1049
1049
return 0 ;
1050
1050
}
1051
1051
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 )
1053
1053
{
1054
1054
int retval ;
1055
1055
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
1100
1100
}
1101
1101
1102
1102
//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 )
1104
1104
{
1105
1105
int retval ;
1106
1106
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)
1149
1149
ni_usb_soft_update_status (board , status .ibsta , 0 );
1150
1150
}
1151
1151
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 )
1153
1153
{
1154
1154
int retval ;
1155
1155
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)
1176
1176
return ;// 0;
1177
1177
}
1178
1178
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 )
1180
1180
{
1181
1181
struct ni_usb_priv * ni_priv = board -> private_data ;
1182
1182
@@ -1189,7 +1189,7 @@ static int ni_usb_enable_eos(gpib_board_t *board, uint8_t eos_byte, int compare_
1189
1189
return 0 ;
1190
1190
}
1191
1191
1192
- static void ni_usb_disable_eos (gpib_board_t * board )
1192
+ static void ni_usb_disable_eos (struct gpib_board * board )
1193
1193
{
1194
1194
struct ni_usb_priv * ni_priv = board -> private_data ;
1195
1195
/* 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)
1199
1199
ni_priv -> eos_char = 0 ;
1200
1200
}
1201
1201
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 )
1203
1203
{
1204
1204
int retval ;
1205
1205
struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1254,7 +1254,7 @@ static void ni_usb_stop(struct ni_usb_priv *ni_priv)
1254
1254
kfree (buffer );
1255
1255
}
1256
1256
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 )
1258
1258
{
1259
1259
int retval ;
1260
1260
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
1312
1312
return i ;
1313
1313
}
1314
1314
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 )
1316
1316
{
1317
1317
int retval ;
1318
1318
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
1334
1334
return 0 ;
1335
1335
}
1336
1336
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 )
1338
1338
{
1339
1339
int retval ;
1340
1340
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)
1389
1389
return retval ;
1390
1390
}
1391
1391
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 )
1393
1393
{
1394
1394
int retval ;
1395
1395
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)
1414
1414
return ;// 0;
1415
1415
}
1416
1416
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 )
1418
1418
{
1419
1419
int retval ;
1420
1420
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)
1442
1442
return ;// 0;
1443
1443
}
1444
1444
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 )
1446
1446
{
1447
1447
int retval ;
1448
1448
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)
1467
1467
return ;// 0;
1468
1468
}
1469
1469
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 )
1471
1471
{
1472
1472
return 0 ;
1473
1473
}
1474
1474
1475
- static void ni_usb_return_to_local (gpib_board_t * board )
1475
+ static void ni_usb_return_to_local (struct gpib_board * board )
1476
1476
{
1477
1477
int retval ;
1478
1478
struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1497,7 +1497,7 @@ static void ni_usb_return_to_local(gpib_board_t *board)
1497
1497
return ;// 0;
1498
1498
}
1499
1499
1500
- static int ni_usb_line_status (const gpib_board_t * board )
1500
+ static int ni_usb_line_status (const struct gpib_board * board )
1501
1501
{
1502
1502
int retval ;
1503
1503
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_
1616
1616
return i ;
1617
1617
}
1618
1618
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 )
1620
1620
{
1621
1621
int retval ;
1622
1622
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)
1640
1640
return actual_ns ;
1641
1641
}
1642
1642
1643
- static int ni_usb_allocate_private (gpib_board_t * board )
1643
+ static int ni_usb_allocate_private (struct gpib_board * board )
1644
1644
{
1645
1645
struct ni_usb_priv * ni_priv ;
1646
1646
@@ -1663,7 +1663,7 @@ static void ni_usb_free_private(struct ni_usb_priv *ni_priv)
1663
1663
}
1664
1664
1665
1665
#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 )
1667
1667
{
1668
1668
struct ni_usb_priv * ni_priv = board -> private_data ;
1669
1669
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
1770
1770
return i ;
1771
1771
}
1772
1772
1773
- static int ni_usb_init (gpib_board_t * board )
1773
+ static int ni_usb_init (struct gpib_board * board )
1774
1774
{
1775
1775
int retval ;
1776
1776
struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -1799,7 +1799,7 @@ static int ni_usb_init(gpib_board_t *board)
1799
1799
1800
1800
static void ni_usb_interrupt_complete (struct urb * urb )
1801
1801
{
1802
- gpib_board_t * board = urb -> context ;
1802
+ struct gpib_board * board = urb -> context ;
1803
1803
struct ni_usb_priv * ni_priv = board -> private_data ;
1804
1804
struct usb_device * usb_dev = interface_to_usbdev (ni_priv -> bus_interface );
1805
1805
int retval ;
@@ -1835,7 +1835,7 @@ static void ni_usb_interrupt_complete(struct urb *urb)
1835
1835
dev_err (& usb_dev -> dev , "failed to resubmit interrupt urb\n" );
1836
1836
}
1837
1837
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 )
1839
1839
{
1840
1840
int retval ;
1841
1841
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
1866
1866
return 0 ;
1867
1867
}
1868
1868
1869
- static int ni_usb_setup_urbs (gpib_board_t * board )
1869
+ static int ni_usb_setup_urbs (struct gpib_board * board )
1870
1870
{
1871
1871
struct ni_usb_priv * ni_priv = board -> private_data ;
1872
1872
struct usb_device * usb_dev ;
@@ -2205,7 +2205,7 @@ static inline int ni_usb_device_match(struct usb_interface *interface,
2205
2205
return 1 ;
2206
2206
}
2207
2207
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 )
2209
2209
{
2210
2210
int retval ;
2211
2211
int i , index ;
@@ -2338,7 +2338,7 @@ static int ni_usb_shutdown_hardware(struct ni_usb_priv *ni_priv)
2338
2338
return 0 ;
2339
2339
}
2340
2340
2341
- static void ni_usb_detach (gpib_board_t * board )
2341
+ static void ni_usb_detach (struct gpib_board * board )
2342
2342
{
2343
2343
struct ni_usb_priv * ni_priv ;
2344
2344
@@ -2445,7 +2445,7 @@ static void ni_usb_driver_disconnect(struct usb_interface *interface)
2445
2445
mutex_lock (& ni_usb_hotplug_lock );
2446
2446
for (i = 0 ; i < MAX_NUM_NI_USB_INTERFACES ; i ++ ) {
2447
2447
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 );
2449
2449
2450
2450
if (board ) {
2451
2451
struct ni_usb_priv * ni_priv = board -> private_data ;
@@ -2474,7 +2474,7 @@ static void ni_usb_driver_disconnect(struct usb_interface *interface)
2474
2474
static int ni_usb_driver_suspend (struct usb_interface * interface , pm_message_t message )
2475
2475
{
2476
2476
struct usb_device * usb_dev = interface_to_usbdev (interface );
2477
- gpib_board_t * board ;
2477
+ struct gpib_board * board ;
2478
2478
int i , retval ;
2479
2479
2480
2480
mutex_lock (& ni_usb_hotplug_lock );
@@ -2518,7 +2518,7 @@ static int ni_usb_driver_resume(struct usb_interface *interface)
2518
2518
{
2519
2519
struct usb_device * usb_dev = interface_to_usbdev (interface );
2520
2520
2521
- gpib_board_t * board ;
2521
+ struct gpib_board * board ;
2522
2522
int i , retval ;
2523
2523
2524
2524
mutex_lock (& ni_usb_hotplug_lock );
0 commit comments