2424MODULE_LICENSE ("GPL" );
2525MODULE_DESCRIPTION ("GPIB Driver for Fluke cda devices" );
2626
27- static int fluke_attach_holdoff_all (gpib_board_t * board , const gpib_board_config_t * config );
28- static int fluke_attach_holdoff_end (gpib_board_t * board , const gpib_board_config_t * config );
29- static void fluke_detach (gpib_board_t * board );
30- static int fluke_config_dma (gpib_board_t * board , int output );
31- static irqreturn_t fluke_gpib_internal_interrupt (gpib_board_t * board );
27+ static int fluke_attach_holdoff_all (struct gpib_board * board , const gpib_board_config_t * config );
28+ static int fluke_attach_holdoff_end (struct gpib_board * board , const gpib_board_config_t * config );
29+ static void fluke_detach (struct gpib_board * board );
30+ static int fluke_config_dma (struct gpib_board * board , int output );
31+ static irqreturn_t fluke_gpib_internal_interrupt (struct gpib_board * board );
3232
3333static struct platform_device * fluke_gpib_pdev ;
3434
@@ -54,136 +54,137 @@ static void fluke_locking_write_byte(struct nec7210_priv *nec_priv, uint8_t byte
5454}
5555
5656// wrappers for interface functions
57- static int fluke_read (gpib_board_t * board , uint8_t * buffer , size_t length , int * end ,
57+ static int fluke_read (struct gpib_board * board , uint8_t * buffer , size_t length , int * end ,
5858 size_t * bytes_read )
5959{
6060 struct fluke_priv * priv = board -> private_data ;
6161
6262 return nec7210_read (board , & priv -> nec7210_priv , buffer , length , end , bytes_read );
6363}
6464
65- static int fluke_write (gpib_board_t * board , uint8_t * buffer , size_t length ,
65+ static int fluke_write (struct gpib_board * board , uint8_t * buffer , size_t length ,
6666 int send_eoi , size_t * bytes_written )
6767{
6868 struct fluke_priv * priv = board -> private_data ;
6969
7070 return nec7210_write (board , & priv -> nec7210_priv , buffer , length , send_eoi , bytes_written );
7171}
7272
73- static int fluke_command (gpib_board_t * board , uint8_t * buffer , size_t length , size_t * bytes_written )
73+ static int fluke_command (struct gpib_board * board , uint8_t * buffer ,
74+ size_t length , size_t * bytes_written )
7475{
7576 struct fluke_priv * priv = board -> private_data ;
7677
7778 return nec7210_command (board , & priv -> nec7210_priv , buffer , length , bytes_written );
7879}
7980
80- static int fluke_take_control (gpib_board_t * board , int synchronous )
81+ static int fluke_take_control (struct gpib_board * board , int synchronous )
8182{
8283 struct fluke_priv * priv = board -> private_data ;
8384
8485 return nec7210_take_control (board , & priv -> nec7210_priv , synchronous );
8586}
8687
87- static int fluke_go_to_standby (gpib_board_t * board )
88+ static int fluke_go_to_standby (struct gpib_board * board )
8889{
8990 struct fluke_priv * priv = board -> private_data ;
9091
9192 return nec7210_go_to_standby (board , & priv -> nec7210_priv );
9293}
9394
94- static void fluke_request_system_control (gpib_board_t * board , int request_control )
95+ static void fluke_request_system_control (struct gpib_board * board , int request_control )
9596{
9697 struct fluke_priv * priv = board -> private_data ;
9798 struct nec7210_priv * nec_priv = & priv -> nec7210_priv ;
9899
99100 nec7210_request_system_control (board , nec_priv , request_control );
100101}
101102
102- static void fluke_interface_clear (gpib_board_t * board , int assert )
103+ static void fluke_interface_clear (struct gpib_board * board , int assert )
103104{
104105 struct fluke_priv * priv = board -> private_data ;
105106
106107 nec7210_interface_clear (board , & priv -> nec7210_priv , assert );
107108}
108109
109- static void fluke_remote_enable (gpib_board_t * board , int enable )
110+ static void fluke_remote_enable (struct gpib_board * board , int enable )
110111{
111112 struct fluke_priv * priv = board -> private_data ;
112113
113114 nec7210_remote_enable (board , & priv -> nec7210_priv , enable );
114115}
115116
116- static int fluke_enable_eos (gpib_board_t * board , uint8_t eos_byte , int compare_8_bits )
117+ static int fluke_enable_eos (struct gpib_board * board , uint8_t eos_byte , int compare_8_bits )
117118{
118119 struct fluke_priv * priv = board -> private_data ;
119120
120121 return nec7210_enable_eos (board , & priv -> nec7210_priv , eos_byte , compare_8_bits );
121122}
122123
123- static void fluke_disable_eos (gpib_board_t * board )
124+ static void fluke_disable_eos (struct gpib_board * board )
124125{
125126 struct fluke_priv * priv = board -> private_data ;
126127
127128 nec7210_disable_eos (board , & priv -> nec7210_priv );
128129}
129130
130- static unsigned int fluke_update_status (gpib_board_t * board , unsigned int clear_mask )
131+ static unsigned int fluke_update_status (struct gpib_board * board , unsigned int clear_mask )
131132{
132133 struct fluke_priv * priv = board -> private_data ;
133134
134135 return nec7210_update_status (board , & priv -> nec7210_priv , clear_mask );
135136}
136137
137- static int fluke_primary_address (gpib_board_t * board , unsigned int address )
138+ static int fluke_primary_address (struct gpib_board * board , unsigned int address )
138139{
139140 struct fluke_priv * priv = board -> private_data ;
140141
141142 return nec7210_primary_address (board , & priv -> nec7210_priv , address );
142143}
143144
144- static int fluke_secondary_address (gpib_board_t * board , unsigned int address , int enable )
145+ static int fluke_secondary_address (struct gpib_board * board , unsigned int address , int enable )
145146{
146147 struct fluke_priv * priv = board -> private_data ;
147148
148149 return nec7210_secondary_address (board , & priv -> nec7210_priv , address , enable );
149150}
150151
151- static int fluke_parallel_poll (gpib_board_t * board , uint8_t * result )
152+ static int fluke_parallel_poll (struct gpib_board * board , uint8_t * result )
152153{
153154 struct fluke_priv * priv = board -> private_data ;
154155
155156 return nec7210_parallel_poll (board , & priv -> nec7210_priv , result );
156157}
157158
158- static void fluke_parallel_poll_configure (gpib_board_t * board , uint8_t configuration )
159+ static void fluke_parallel_poll_configure (struct gpib_board * board , uint8_t configuration )
159160{
160161 struct fluke_priv * priv = board -> private_data ;
161162
162163 nec7210_parallel_poll_configure (board , & priv -> nec7210_priv , configuration );
163164}
164165
165- static void fluke_parallel_poll_response (gpib_board_t * board , int ist )
166+ static void fluke_parallel_poll_response (struct gpib_board * board , int ist )
166167{
167168 struct fluke_priv * priv = board -> private_data ;
168169
169170 nec7210_parallel_poll_response (board , & priv -> nec7210_priv , ist );
170171}
171172
172- static void fluke_serial_poll_response (gpib_board_t * board , uint8_t status )
173+ static void fluke_serial_poll_response (struct gpib_board * board , uint8_t status )
173174{
174175 struct fluke_priv * priv = board -> private_data ;
175176
176177 nec7210_serial_poll_response (board , & priv -> nec7210_priv , status );
177178}
178179
179- static uint8_t fluke_serial_poll_status (gpib_board_t * board )
180+ static uint8_t fluke_serial_poll_status (struct gpib_board * board )
180181{
181182 struct fluke_priv * priv = board -> private_data ;
182183
183184 return nec7210_serial_poll_status (board , & priv -> nec7210_priv );
184185}
185186
186- static void fluke_return_to_local (gpib_board_t * board )
187+ static void fluke_return_to_local (struct gpib_board * board )
187188{
188189 struct fluke_priv * priv = board -> private_data ;
189190 struct nec7210_priv * nec_priv = & priv -> nec7210_priv ;
@@ -193,7 +194,7 @@ static void fluke_return_to_local(gpib_board_t *board)
193194 write_byte (nec_priv , AUX_RTL , AUXMR );
194195}
195196
196- static int fluke_line_status (const gpib_board_t * board )
197+ static int fluke_line_status (const struct gpib_board * board )
197198{
198199 int status = VALID_ALL ;
199200 int bsr_bits ;
@@ -223,7 +224,7 @@ static int fluke_line_status(const gpib_board_t *board)
223224 return status ;
224225}
225226
226- static unsigned int fluke_t1_delay (gpib_board_t * board , unsigned int nano_sec )
227+ static unsigned int fluke_t1_delay (struct gpib_board * board , unsigned int nano_sec )
227228{
228229 struct fluke_priv * e_priv = board -> private_data ;
229230 struct nec7210_priv * nec_priv = & e_priv -> nec7210_priv ;
@@ -240,7 +241,7 @@ static unsigned int fluke_t1_delay(gpib_board_t *board, unsigned int nano_sec)
240241 return retval ;
241242}
242243
243- static int lacs_or_read_ready (gpib_board_t * board )
244+ static int lacs_or_read_ready (struct gpib_board * board )
244245{
245246 const struct fluke_priv * e_priv = board -> private_data ;
246247 const struct nec7210_priv * nec_priv = & e_priv -> nec7210_priv ;
@@ -256,7 +257,7 @@ static int lacs_or_read_ready(gpib_board_t *board)
256257/* Wait until it is possible for a read to do something useful. This
257258 * is not essential, it only exists to prevent RFD holdoff from being released pointlessly.
258259 */
259- static int wait_for_read (gpib_board_t * board )
260+ static int wait_for_read (struct gpib_board * board )
260261{
261262 struct fluke_priv * e_priv = board -> private_data ;
262263 struct nec7210_priv * nec_priv = & e_priv -> nec7210_priv ;
@@ -313,7 +314,7 @@ static int source_handshake_is_sids_or_sgns(struct fluke_priv *e_priv)
313314 * If the chip is SGNS it is probably waiting for a a byte to
314315 * be written to it.
315316 */
316- static int wait_for_data_out_ready (gpib_board_t * board )
317+ static int wait_for_data_out_ready (struct gpib_board * board )
317318{
318319 struct fluke_priv * e_priv = board -> private_data ;
319320 struct nec7210_priv * nec_priv = & e_priv -> nec7210_priv ;
@@ -332,7 +333,7 @@ static int wait_for_data_out_ready(gpib_board_t *board)
332333 return retval ;
333334}
334335
335- static int wait_for_sids_or_sgns (gpib_board_t * board )
336+ static int wait_for_sids_or_sgns (struct gpib_board * board )
336337{
337338 struct fluke_priv * e_priv = board -> private_data ;
338339 struct nec7210_priv * nec_priv = & e_priv -> nec7210_priv ;
@@ -353,7 +354,7 @@ static int wait_for_sids_or_sgns(gpib_board_t *board)
353354
354355static void fluke_dma_callback (void * arg )
355356{
356- gpib_board_t * board = arg ;
357+ struct gpib_board * board = arg ;
357358 struct fluke_priv * e_priv = board -> private_data ;
358359 struct nec7210_priv * nec_priv = & e_priv -> nec7210_priv ;
359360 unsigned long flags ;
@@ -370,7 +371,7 @@ static void fluke_dma_callback(void *arg)
370371 spin_unlock_irqrestore (& board -> spinlock , flags );
371372}
372373
373- static int fluke_dma_write (gpib_board_t * board , uint8_t * buffer , size_t length ,
374+ static int fluke_dma_write (struct gpib_board * board , uint8_t * buffer , size_t length ,
374375 size_t * bytes_written )
375376{
376377 struct fluke_priv * e_priv = board -> private_data ;
@@ -455,7 +456,7 @@ static int fluke_dma_write(gpib_board_t *board, uint8_t *buffer, size_t length,
455456 return retval ;
456457}
457458
458- static int fluke_accel_write (gpib_board_t * board , uint8_t * buffer , size_t length ,
459+ static int fluke_accel_write (struct gpib_board * board , uint8_t * buffer , size_t length ,
459460 int send_eoi , size_t * bytes_written )
460461{
461462 struct fluke_priv * e_priv = board -> private_data ;
@@ -543,7 +544,7 @@ static int fluke_get_dma_residue(struct dma_chan *chan, dma_cookie_t cookie)
543544 return state .residue ;
544545}
545546
546- static int fluke_dma_read (gpib_board_t * board , uint8_t * buffer ,
547+ static int fluke_dma_read (struct gpib_board * board , uint8_t * buffer ,
547548 size_t length , int * end , size_t * bytes_read )
548549{
549550 struct fluke_priv * e_priv = board -> private_data ;
@@ -656,7 +657,7 @@ static int fluke_dma_read(gpib_board_t *board, uint8_t *buffer,
656657 return retval ;
657658}
658659
659- static int fluke_accel_read (gpib_board_t * board , uint8_t * buffer , size_t length ,
660+ static int fluke_accel_read (struct gpib_board * board , uint8_t * buffer , size_t length ,
660661 int * end , size_t * bytes_read )
661662{
662663 struct fluke_priv * e_priv = board -> private_data ;
@@ -786,7 +787,7 @@ static gpib_interface_t fluke_interface = {
786787 .return_to_local = fluke_return_to_local ,
787788};
788789
789- irqreturn_t fluke_gpib_internal_interrupt (gpib_board_t * board )
790+ irqreturn_t fluke_gpib_internal_interrupt (struct gpib_board * board )
790791{
791792 int status0 , status1 , status2 ;
792793 struct fluke_priv * priv = board -> private_data ;
@@ -823,7 +824,7 @@ irqreturn_t fluke_gpib_internal_interrupt(gpib_board_t *board)
823824
824825static irqreturn_t fluke_gpib_interrupt (int irq , void * arg )
825826{
826- gpib_board_t * board = arg ;
827+ struct gpib_board * board = arg ;
827828 unsigned long flags ;
828829 irqreturn_t retval ;
829830
@@ -833,7 +834,7 @@ static irqreturn_t fluke_gpib_interrupt(int irq, void *arg)
833834 return retval ;
834835}
835836
836- static int fluke_allocate_private (gpib_board_t * board )
837+ static int fluke_allocate_private (struct gpib_board * board )
837838{
838839 struct fluke_priv * priv ;
839840
@@ -850,7 +851,7 @@ static int fluke_allocate_private(gpib_board_t *board)
850851 return 0 ;
851852}
852853
853- static void fluke_generic_detach (gpib_board_t * board )
854+ static void fluke_generic_detach (struct gpib_board * board )
854855{
855856 if (board -> private_data ) {
856857 struct fluke_priv * e_priv = board -> private_data ;
@@ -862,7 +863,7 @@ static void fluke_generic_detach(gpib_board_t *board)
862863}
863864
864865// generic part of attach functions shared by all cb7210 boards
865- static int fluke_generic_attach (gpib_board_t * board )
866+ static int fluke_generic_attach (struct gpib_board * board )
866867{
867868 struct fluke_priv * e_priv ;
868869 struct nec7210_priv * nec_priv ;
@@ -882,7 +883,7 @@ static int fluke_generic_attach(gpib_board_t *board)
882883 return 0 ;
883884}
884885
885- static int fluke_config_dma (gpib_board_t * board , int output )
886+ static int fluke_config_dma (struct gpib_board * board , int output )
886887{
887888 struct fluke_priv * e_priv = board -> private_data ;
888889 struct dma_slave_config config ;
@@ -907,7 +908,7 @@ static int fluke_config_dma(gpib_board_t *board, int output)
907908 return dmaengine_slave_config (e_priv -> dma_channel , & config );
908909}
909910
910- static int fluke_init (struct fluke_priv * e_priv , gpib_board_t * board , int handshake_mode )
911+ static int fluke_init (struct fluke_priv * e_priv , struct gpib_board * board , int handshake_mode )
911912{
912913 struct nec7210_priv * nec_priv = & e_priv -> nec7210_priv ;
913914
@@ -942,7 +943,7 @@ static bool gpib_dma_channel_filter(struct dma_chan *chan, void *filter_param)
942943 return chan -> chan_id == 0 ;
943944}
944945
945- static int fluke_attach_impl (gpib_board_t * board , const gpib_board_config_t * config ,
946+ static int fluke_attach_impl (struct gpib_board * board , const gpib_board_config_t * config ,
946947 unsigned int handshake_mode )
947948{
948949 struct fluke_priv * e_priv ;
@@ -1048,17 +1049,17 @@ static int fluke_attach_impl(gpib_board_t *board, const gpib_board_config_t *con
10481049 return fluke_init (e_priv , board , handshake_mode );
10491050}
10501051
1051- int fluke_attach_holdoff_all (gpib_board_t * board , const gpib_board_config_t * config )
1052+ int fluke_attach_holdoff_all (struct gpib_board * board , const gpib_board_config_t * config )
10521053{
10531054 return fluke_attach_impl (board , config , HR_HLDA );
10541055}
10551056
1056- int fluke_attach_holdoff_end (gpib_board_t * board , const gpib_board_config_t * config )
1057+ int fluke_attach_holdoff_end (struct gpib_board * board , const gpib_board_config_t * config )
10571058{
10581059 return fluke_attach_impl (board , config , HR_HLDE );
10591060}
10601061
1061- void fluke_detach (gpib_board_t * board )
1062+ void fluke_detach (struct gpib_board * board )
10621063{
10631064 struct fluke_priv * e_priv = board -> private_data ;
10641065 struct nec7210_priv * nec_priv ;
0 commit comments