@@ -25,7 +25,7 @@ MODULE_DESCRIPTION("GPIB driver for CEC PCI and PCMCIA boards");
25
25
26
26
static irqreturn_t cec_interrupt (int irq , void * arg )
27
27
{
28
- gpib_board_t * board = arg ;
28
+ struct gpib_board * board = arg ;
29
29
struct cec_priv * priv = board -> private_data ;
30
30
unsigned long flags ;
31
31
irqreturn_t retval ;
@@ -40,147 +40,148 @@ static irqreturn_t cec_interrupt(int irq, void *arg)
40
40
#define CEC_DEV_ID 0x5cec
41
41
#define CEC_SUBID 0x9050
42
42
43
- static int cec_pci_attach (gpib_board_t * board , const gpib_board_config_t * config );
43
+ static int cec_pci_attach (struct gpib_board * board , const gpib_board_config_t * config );
44
44
45
- static void cec_pci_detach (gpib_board_t * board );
45
+ static void cec_pci_detach (struct gpib_board * board );
46
46
47
47
// wrappers for interface functions
48
- static int cec_read (gpib_board_t * board , uint8_t * buffer , size_t length , int * end ,
48
+ static int cec_read (struct gpib_board * board , uint8_t * buffer , size_t length , int * end ,
49
49
size_t * bytes_read )
50
50
{
51
51
struct cec_priv * priv = board -> private_data ;
52
52
53
53
return nec7210_read (board , & priv -> nec7210_priv , buffer , length , end , bytes_read );
54
54
}
55
55
56
- static int cec_write (gpib_board_t * board , uint8_t * buffer , size_t length , int send_eoi ,
56
+ static int cec_write (struct gpib_board * board , uint8_t * buffer , size_t length , int send_eoi ,
57
57
size_t * bytes_written )
58
58
{
59
59
struct cec_priv * priv = board -> private_data ;
60
60
61
61
return nec7210_write (board , & priv -> nec7210_priv , buffer , length , send_eoi , bytes_written );
62
62
}
63
63
64
- static int cec_command (gpib_board_t * board , uint8_t * buffer , size_t length , size_t * bytes_written )
64
+ static int cec_command (struct gpib_board * board , uint8_t * buffer ,
65
+ size_t length , size_t * bytes_written )
65
66
{
66
67
struct cec_priv * priv = board -> private_data ;
67
68
68
69
return nec7210_command (board , & priv -> nec7210_priv , buffer , length , bytes_written );
69
70
}
70
71
71
- static int cec_take_control (gpib_board_t * board , int synchronous )
72
+ static int cec_take_control (struct gpib_board * board , int synchronous )
72
73
{
73
74
struct cec_priv * priv = board -> private_data ;
74
75
75
76
return nec7210_take_control (board , & priv -> nec7210_priv , synchronous );
76
77
}
77
78
78
- static int cec_go_to_standby (gpib_board_t * board )
79
+ static int cec_go_to_standby (struct gpib_board * board )
79
80
{
80
81
struct cec_priv * priv = board -> private_data ;
81
82
82
83
return nec7210_go_to_standby (board , & priv -> nec7210_priv );
83
84
}
84
85
85
- static void cec_request_system_control (gpib_board_t * board , int request_control )
86
+ static void cec_request_system_control (struct gpib_board * board , int request_control )
86
87
{
87
88
struct cec_priv * priv = board -> private_data ;
88
89
89
90
nec7210_request_system_control (board , & priv -> nec7210_priv , request_control );
90
91
}
91
92
92
- static void cec_interface_clear (gpib_board_t * board , int assert )
93
+ static void cec_interface_clear (struct gpib_board * board , int assert )
93
94
{
94
95
struct cec_priv * priv = board -> private_data ;
95
96
96
97
nec7210_interface_clear (board , & priv -> nec7210_priv , assert );
97
98
}
98
99
99
- static void cec_remote_enable (gpib_board_t * board , int enable )
100
+ static void cec_remote_enable (struct gpib_board * board , int enable )
100
101
{
101
102
struct cec_priv * priv = board -> private_data ;
102
103
103
104
nec7210_remote_enable (board , & priv -> nec7210_priv , enable );
104
105
}
105
106
106
- static int cec_enable_eos (gpib_board_t * board , uint8_t eos_byte , int compare_8_bits )
107
+ static int cec_enable_eos (struct gpib_board * board , uint8_t eos_byte , int compare_8_bits )
107
108
{
108
109
struct cec_priv * priv = board -> private_data ;
109
110
110
111
return nec7210_enable_eos (board , & priv -> nec7210_priv , eos_byte , compare_8_bits );
111
112
}
112
113
113
- static void cec_disable_eos (gpib_board_t * board )
114
+ static void cec_disable_eos (struct gpib_board * board )
114
115
{
115
116
struct cec_priv * priv = board -> private_data ;
116
117
117
118
nec7210_disable_eos (board , & priv -> nec7210_priv );
118
119
}
119
120
120
- static unsigned int cec_update_status (gpib_board_t * board , unsigned int clear_mask )
121
+ static unsigned int cec_update_status (struct gpib_board * board , unsigned int clear_mask )
121
122
{
122
123
struct cec_priv * priv = board -> private_data ;
123
124
124
125
return nec7210_update_status (board , & priv -> nec7210_priv , clear_mask );
125
126
}
126
127
127
- static int cec_primary_address (gpib_board_t * board , unsigned int address )
128
+ static int cec_primary_address (struct gpib_board * board , unsigned int address )
128
129
{
129
130
struct cec_priv * priv = board -> private_data ;
130
131
131
132
return nec7210_primary_address (board , & priv -> nec7210_priv , address );
132
133
}
133
134
134
- static int cec_secondary_address (gpib_board_t * board , unsigned int address , int enable )
135
+ static int cec_secondary_address (struct gpib_board * board , unsigned int address , int enable )
135
136
{
136
137
struct cec_priv * priv = board -> private_data ;
137
138
138
139
return nec7210_secondary_address (board , & priv -> nec7210_priv , address , enable );
139
140
}
140
141
141
- static int cec_parallel_poll (gpib_board_t * board , uint8_t * result )
142
+ static int cec_parallel_poll (struct gpib_board * board , uint8_t * result )
142
143
{
143
144
struct cec_priv * priv = board -> private_data ;
144
145
145
146
return nec7210_parallel_poll (board , & priv -> nec7210_priv , result );
146
147
}
147
148
148
- static void cec_parallel_poll_configure (gpib_board_t * board , uint8_t config )
149
+ static void cec_parallel_poll_configure (struct gpib_board * board , uint8_t config )
149
150
{
150
151
struct cec_priv * priv = board -> private_data ;
151
152
152
153
nec7210_parallel_poll_configure (board , & priv -> nec7210_priv , config );
153
154
}
154
155
155
- static void cec_parallel_poll_response (gpib_board_t * board , int ist )
156
+ static void cec_parallel_poll_response (struct gpib_board * board , int ist )
156
157
{
157
158
struct cec_priv * priv = board -> private_data ;
158
159
159
160
nec7210_parallel_poll_response (board , & priv -> nec7210_priv , ist );
160
161
}
161
162
162
- static void cec_serial_poll_response (gpib_board_t * board , uint8_t status )
163
+ static void cec_serial_poll_response (struct gpib_board * board , uint8_t status )
163
164
{
164
165
struct cec_priv * priv = board -> private_data ;
165
166
166
167
nec7210_serial_poll_response (board , & priv -> nec7210_priv , status );
167
168
}
168
169
169
- static uint8_t cec_serial_poll_status (gpib_board_t * board )
170
+ static uint8_t cec_serial_poll_status (struct gpib_board * board )
170
171
{
171
172
struct cec_priv * priv = board -> private_data ;
172
173
173
174
return nec7210_serial_poll_status (board , & priv -> nec7210_priv );
174
175
}
175
176
176
- static unsigned int cec_t1_delay (gpib_board_t * board , unsigned int nano_sec )
177
+ static unsigned int cec_t1_delay (struct gpib_board * board , unsigned int nano_sec )
177
178
{
178
179
struct cec_priv * priv = board -> private_data ;
179
180
180
181
return nec7210_t1_delay (board , & priv -> nec7210_priv , nano_sec );
181
182
}
182
183
183
- static void cec_return_to_local (gpib_board_t * board )
184
+ static void cec_return_to_local (struct gpib_board * board )
184
185
{
185
186
struct cec_priv * priv = board -> private_data ;
186
187
@@ -215,7 +216,7 @@ static gpib_interface_t cec_pci_interface = {
215
216
.return_to_local = cec_return_to_local ,
216
217
};
217
218
218
- static int cec_allocate_private (gpib_board_t * board )
219
+ static int cec_allocate_private (struct gpib_board * board )
219
220
{
220
221
struct cec_priv * priv ;
221
222
@@ -228,13 +229,13 @@ static int cec_allocate_private(gpib_board_t *board)
228
229
return 0 ;
229
230
}
230
231
231
- static void cec_free_private (gpib_board_t * board )
232
+ static void cec_free_private (struct gpib_board * board )
232
233
{
233
234
kfree (board -> private_data );
234
235
board -> private_data = NULL ;
235
236
}
236
237
237
- static int cec_generic_attach (gpib_board_t * board )
238
+ static int cec_generic_attach (struct gpib_board * board )
238
239
{
239
240
struct cec_priv * cec_priv ;
240
241
struct nec7210_priv * nec_priv ;
@@ -252,7 +253,7 @@ static int cec_generic_attach(gpib_board_t *board)
252
253
return 0 ;
253
254
}
254
255
255
- static void cec_init (struct cec_priv * cec_priv , const gpib_board_t * board )
256
+ static void cec_init (struct cec_priv * cec_priv , const struct gpib_board * board )
256
257
{
257
258
struct nec7210_priv * nec_priv = & cec_priv -> nec7210_priv ;
258
259
@@ -264,7 +265,7 @@ static void cec_init(struct cec_priv *cec_priv, const gpib_board_t *board)
264
265
nec7210_board_online (nec_priv , board );
265
266
}
266
267
267
- static int cec_pci_attach (gpib_board_t * board , const gpib_board_config_t * config )
268
+ static int cec_pci_attach (struct gpib_board * board , const gpib_board_config_t * config )
268
269
{
269
270
struct cec_priv * cec_priv ;
270
271
struct nec7210_priv * nec_priv ;
@@ -322,7 +323,7 @@ static int cec_pci_attach(gpib_board_t *board, const gpib_board_config_t *config
322
323
return 0 ;
323
324
}
324
325
325
- static void cec_pci_detach (gpib_board_t * board )
326
+ static void cec_pci_detach (struct gpib_board * board )
326
327
{
327
328
struct cec_priv * cec_priv = board -> private_data ;
328
329
struct nec7210_priv * nec_priv ;
0 commit comments