@@ -318,14 +318,14 @@ struct bb_priv {
318
318
};
319
319
320
320
static inline long usec_diff (struct timespec64 * a , struct timespec64 * b );
321
- static void bb_buffer_print (gpib_board_t * board , unsigned char * buffer , size_t length ,
321
+ static void bb_buffer_print (struct gpib_board * board , unsigned char * buffer , size_t length ,
322
322
int cmd , int eoi );
323
323
static void set_data_lines (u8 byte );
324
324
static u8 get_data_lines (void );
325
325
static void set_data_lines_input (void );
326
326
static void set_data_lines_output (void );
327
327
static inline int check_for_eos (struct bb_priv * priv , uint8_t byte );
328
- static void set_atn (gpib_board_t * board , int atn_asserted );
328
+ static void set_atn (struct gpib_board * board , int atn_asserted );
329
329
330
330
static inline void SET_DIR_WRITE (struct bb_priv * priv );
331
331
static inline void SET_DIR_READ (struct bb_priv * priv );
@@ -353,7 +353,7 @@ static char printable(char x)
353
353
* *
354
354
***************************************************************************/
355
355
356
- static int bb_read (gpib_board_t * board , uint8_t * buffer , size_t length ,
356
+ static int bb_read (struct gpib_board * board , uint8_t * buffer , size_t length ,
357
357
int * end , size_t * bytes_read )
358
358
{
359
359
struct bb_priv * priv = board -> private_data ;
@@ -425,7 +425,7 @@ static int bb_read(gpib_board_t *board, uint8_t *buffer, size_t length,
425
425
426
426
static irqreturn_t bb_DAV_interrupt (int irq , void * arg )
427
427
{
428
- gpib_board_t * board = arg ;
428
+ struct gpib_board * board = arg ;
429
429
struct bb_priv * priv = board -> private_data ;
430
430
int val ;
431
431
unsigned long flags ;
@@ -491,7 +491,7 @@ static irqreturn_t bb_DAV_interrupt(int irq, void *arg)
491
491
* *
492
492
***************************************************************************/
493
493
494
- static int bb_write (gpib_board_t * board , uint8_t * buffer , size_t length ,
494
+ static int bb_write (struct gpib_board * board , uint8_t * buffer , size_t length ,
495
495
int send_eoi , size_t * bytes_written )
496
496
{
497
497
unsigned long flags ;
@@ -580,7 +580,7 @@ static int bb_write(gpib_board_t *board, uint8_t *buffer, size_t length,
580
580
581
581
static irqreturn_t bb_NRFD_interrupt (int irq , void * arg )
582
582
{
583
- gpib_board_t * board = arg ;
583
+ struct gpib_board * board = arg ;
584
584
struct bb_priv * priv = board -> private_data ;
585
585
unsigned long flags ;
586
586
int nrfd ;
@@ -653,7 +653,7 @@ static irqreturn_t bb_NRFD_interrupt(int irq, void *arg)
653
653
654
654
static irqreturn_t bb_NDAC_interrupt (int irq , void * arg )
655
655
{
656
- gpib_board_t * board = arg ;
656
+ struct gpib_board * board = arg ;
657
657
struct bb_priv * priv = board -> private_data ;
658
658
unsigned long flags ;
659
659
int ndac ;
@@ -714,7 +714,7 @@ static irqreturn_t bb_NDAC_interrupt(int irq, void *arg)
714
714
715
715
static irqreturn_t bb_SRQ_interrupt (int irq , void * arg )
716
716
{
717
- gpib_board_t * board = arg ;
717
+ struct gpib_board * board = arg ;
718
718
719
719
int val = gpiod_get_value (SRQ );
720
720
@@ -728,7 +728,7 @@ static irqreturn_t bb_SRQ_interrupt(int irq, void *arg)
728
728
return IRQ_HANDLED ;
729
729
}
730
730
731
- static int bb_command (gpib_board_t * board , uint8_t * buffer ,
731
+ static int bb_command (struct gpib_board * board , uint8_t * buffer ,
732
732
size_t length , size_t * bytes_written )
733
733
{
734
734
size_t ret ;
@@ -809,7 +809,7 @@ static char *cmd_string[32] = {
809
809
"CFE" // 0x1f
810
810
};
811
811
812
- static void bb_buffer_print (gpib_board_t * board , unsigned char * buffer , size_t length ,
812
+ static void bb_buffer_print (struct gpib_board * board , unsigned char * buffer , size_t length ,
813
813
int cmd , int eoi )
814
814
{
815
815
int i ;
@@ -842,7 +842,7 @@ static void bb_buffer_print(gpib_board_t *board, unsigned char *buffer, size_t l
842
842
* STATUS Management *
843
843
* *
844
844
***************************************************************************/
845
- static void set_atn (gpib_board_t * board , int atn_asserted )
845
+ static void set_atn (struct gpib_board * board , int atn_asserted )
846
846
{
847
847
struct bb_priv * priv = board -> private_data ;
848
848
@@ -867,22 +867,22 @@ static void set_atn(gpib_board_t *board, int atn_asserted)
867
867
priv -> atn_asserted = atn_asserted ;
868
868
}
869
869
870
- static int bb_take_control (gpib_board_t * board , int synchronous )
870
+ static int bb_take_control (struct gpib_board * board , int synchronous )
871
871
{
872
872
dbg_printk (2 , "%d\n" , synchronous );
873
873
set_atn (board , 1 );
874
874
set_bit (CIC_NUM , & board -> status );
875
875
return 0 ;
876
876
}
877
877
878
- static int bb_go_to_standby (gpib_board_t * board )
878
+ static int bb_go_to_standby (struct gpib_board * board )
879
879
{
880
880
dbg_printk (2 , "\n" );
881
881
set_atn (board , 0 );
882
882
return 0 ;
883
883
}
884
884
885
- static void bb_request_system_control (gpib_board_t * board , int request_control )
885
+ static void bb_request_system_control (struct gpib_board * board , int request_control )
886
886
{
887
887
dbg_printk (2 , "%d\n" , request_control );
888
888
if (request_control ) {
@@ -894,7 +894,7 @@ static void bb_request_system_control(gpib_board_t *board, int request_control)
894
894
}
895
895
}
896
896
897
- static void bb_interface_clear (gpib_board_t * board , int assert )
897
+ static void bb_interface_clear (struct gpib_board * board , int assert )
898
898
{
899
899
struct bb_priv * priv = board -> private_data ;
900
900
@@ -908,7 +908,7 @@ static void bb_interface_clear(gpib_board_t *board, int assert)
908
908
}
909
909
}
910
910
911
- static void bb_remote_enable (gpib_board_t * board , int enable )
911
+ static void bb_remote_enable (struct gpib_board * board , int enable )
912
912
{
913
913
dbg_printk (2 , "%d\n" , enable );
914
914
if (enable ) {
@@ -920,7 +920,7 @@ static void bb_remote_enable(gpib_board_t *board, int enable)
920
920
}
921
921
}
922
922
923
- static int bb_enable_eos (gpib_board_t * board , uint8_t eos_byte , int compare_8_bits )
923
+ static int bb_enable_eos (struct gpib_board * board , uint8_t eos_byte , int compare_8_bits )
924
924
{
925
925
struct bb_priv * priv = board -> private_data ;
926
926
@@ -933,15 +933,15 @@ static int bb_enable_eos(gpib_board_t *board, uint8_t eos_byte, int compare_8_bi
933
933
return 0 ;
934
934
}
935
935
936
- static void bb_disable_eos (gpib_board_t * board )
936
+ static void bb_disable_eos (struct gpib_board * board )
937
937
{
938
938
struct bb_priv * priv = board -> private_data ;
939
939
940
940
dbg_printk (2 , "\n" );
941
941
priv -> eos_flags &= ~REOS ;
942
942
}
943
943
944
- static unsigned int bb_update_status (gpib_board_t * board , unsigned int clear_mask )
944
+ static unsigned int bb_update_status (struct gpib_board * board , unsigned int clear_mask )
945
945
{
946
946
struct bb_priv * priv = board -> private_data ;
947
947
@@ -972,44 +972,44 @@ static unsigned int bb_update_status(gpib_board_t *board, unsigned int clear_mas
972
972
return board -> status ;
973
973
}
974
974
975
- static int bb_primary_address (gpib_board_t * board , unsigned int address )
975
+ static int bb_primary_address (struct gpib_board * board , unsigned int address )
976
976
{
977
977
dbg_printk (2 , "%d\n" , address );
978
978
board -> pad = address ;
979
979
return 0 ;
980
980
}
981
981
982
- static int bb_secondary_address (gpib_board_t * board , unsigned int address , int enable )
982
+ static int bb_secondary_address (struct gpib_board * board , unsigned int address , int enable )
983
983
{
984
984
dbg_printk (2 , "%d %d\n" , address , enable );
985
985
if (enable )
986
986
board -> sad = address ;
987
987
return 0 ;
988
988
}
989
989
990
- static int bb_parallel_poll (gpib_board_t * board , uint8_t * result )
990
+ static int bb_parallel_poll (struct gpib_board * board , uint8_t * result )
991
991
{
992
992
return - ENOENT ;
993
993
}
994
994
995
- static void bb_parallel_poll_configure (gpib_board_t * board , uint8_t config )
995
+ static void bb_parallel_poll_configure (struct gpib_board * board , uint8_t config )
996
996
{
997
997
}
998
998
999
- static void bb_parallel_poll_response (gpib_board_t * board , int ist )
999
+ static void bb_parallel_poll_response (struct gpib_board * board , int ist )
1000
1000
{
1001
1001
}
1002
1002
1003
- static void bb_serial_poll_response (gpib_board_t * board , uint8_t status )
1003
+ static void bb_serial_poll_response (struct gpib_board * board , uint8_t status )
1004
1004
{
1005
1005
}
1006
1006
1007
- static uint8_t bb_serial_poll_status (gpib_board_t * board )
1007
+ static uint8_t bb_serial_poll_status (struct gpib_board * board )
1008
1008
{
1009
1009
return 0 ; // -ENOENT;
1010
1010
}
1011
1011
1012
- static unsigned int bb_t1_delay (gpib_board_t * board , unsigned int nano_sec )
1012
+ static unsigned int bb_t1_delay (struct gpib_board * board , unsigned int nano_sec )
1013
1013
{
1014
1014
struct bb_priv * priv = board -> private_data ;
1015
1015
@@ -1025,11 +1025,11 @@ static unsigned int bb_t1_delay(gpib_board_t *board, unsigned int nano_sec)
1025
1025
return priv -> t1_delay ;
1026
1026
}
1027
1027
1028
- static void bb_return_to_local (gpib_board_t * board )
1028
+ static void bb_return_to_local (struct gpib_board * board )
1029
1029
{
1030
1030
}
1031
1031
1032
- static int bb_line_status (const gpib_board_t * board )
1032
+ static int bb_line_status (const struct gpib_board * board )
1033
1033
{
1034
1034
int line_status = VALID_ALL ;
1035
1035
@@ -1061,21 +1061,21 @@ static int bb_line_status(const gpib_board_t *board)
1061
1061
* *
1062
1062
***************************************************************************/
1063
1063
1064
- static int allocate_private (gpib_board_t * board )
1064
+ static int allocate_private (struct gpib_board * board )
1065
1065
{
1066
1066
board -> private_data = kzalloc (sizeof (struct bb_priv ), GFP_KERNEL );
1067
1067
if (!board -> private_data )
1068
1068
return -1 ;
1069
1069
return 0 ;
1070
1070
}
1071
1071
1072
- static void free_private (gpib_board_t * board )
1072
+ static void free_private (struct gpib_board * board )
1073
1073
{
1074
1074
kfree (board -> private_data );
1075
1075
board -> private_data = NULL ;
1076
1076
}
1077
1077
1078
- static int bb_get_irq (gpib_board_t * board , char * name ,
1078
+ static int bb_get_irq (struct gpib_board * board , char * name ,
1079
1079
struct gpio_desc * gpio , int * irq ,
1080
1080
irq_handler_t handler , irq_handler_t thread_fn , unsigned long flags )
1081
1081
{
@@ -1097,7 +1097,7 @@ static int bb_get_irq(gpib_board_t *board, char *name,
1097
1097
return 0 ;
1098
1098
}
1099
1099
1100
- static void bb_free_irq (gpib_board_t * board , int * irq , char * name )
1100
+ static void bb_free_irq (struct gpib_board * board , int * irq , char * name )
1101
1101
{
1102
1102
if (* irq ) {
1103
1103
free_irq (* irq , board );
@@ -1118,7 +1118,7 @@ static void release_gpios(void)
1118
1118
}
1119
1119
}
1120
1120
1121
- static int allocate_gpios (gpib_board_t * board )
1121
+ static int allocate_gpios (struct gpib_board * board )
1122
1122
{
1123
1123
int j , retval = 0 ;
1124
1124
bool error = false;
@@ -1176,7 +1176,7 @@ static int allocate_gpios(gpib_board_t *board)
1176
1176
return retval ;
1177
1177
}
1178
1178
1179
- static void bb_detach (gpib_board_t * board )
1179
+ static void bb_detach (struct gpib_board * board )
1180
1180
{
1181
1181
struct bb_priv * priv = board -> private_data ;
1182
1182
@@ -1206,7 +1206,7 @@ static void bb_detach(gpib_board_t *board)
1206
1206
free_private (board );
1207
1207
}
1208
1208
1209
- static int bb_attach (gpib_board_t * board , const gpib_board_config_t * config )
1209
+ static int bb_attach (struct gpib_board * board , const gpib_board_config_t * config )
1210
1210
{
1211
1211
struct bb_priv * priv ;
1212
1212
int retval = 0 ;
0 commit comments