|
24 | 24 | MODULE_LICENSE("GPL"); |
25 | 25 | MODULE_DESCRIPTION("GPIB driver for HP 82335 interface cards"); |
26 | 26 |
|
27 | | -static int hp82335_attach(gpib_board_t *board, const gpib_board_config_t *config); |
28 | | -static void hp82335_detach(gpib_board_t *board); |
| 27 | +static int hp82335_attach(struct gpib_board *board, const gpib_board_config_t *config); |
| 28 | +static void hp82335_detach(struct gpib_board *board); |
29 | 29 | static irqreturn_t hp82335_interrupt(int irq, void *arg); |
30 | 30 |
|
31 | 31 | // wrappers for interface functions |
32 | | -static int hp82335_read(gpib_board_t *board, uint8_t *buffer, size_t length, |
| 32 | +static int hp82335_read(struct gpib_board *board, uint8_t *buffer, size_t length, |
33 | 33 | int *end, size_t *bytes_read) |
34 | 34 | { |
35 | 35 | struct hp82335_priv *priv = board->private_data; |
36 | 36 |
|
37 | 37 | return tms9914_read(board, &priv->tms9914_priv, buffer, length, end, bytes_read); |
38 | 38 | } |
39 | 39 |
|
40 | | -static int hp82335_write(gpib_board_t *board, uint8_t *buffer, size_t length, int send_eoi, |
| 40 | +static int hp82335_write(struct gpib_board *board, uint8_t *buffer, size_t length, int send_eoi, |
41 | 41 | size_t *bytes_written) |
42 | 42 | { |
43 | 43 | struct hp82335_priv *priv = board->private_data; |
44 | 44 |
|
45 | 45 | return tms9914_write(board, &priv->tms9914_priv, buffer, length, send_eoi, bytes_written); |
46 | 46 | } |
47 | 47 |
|
48 | | -static int hp82335_command(gpib_board_t *board, uint8_t *buffer, size_t length, |
| 48 | +static int hp82335_command(struct gpib_board *board, uint8_t *buffer, size_t length, |
49 | 49 | size_t *bytes_written) |
50 | 50 | { |
51 | 51 | struct hp82335_priv *priv = board->private_data; |
52 | 52 |
|
53 | 53 | return tms9914_command(board, &priv->tms9914_priv, buffer, length, bytes_written); |
54 | 54 | } |
55 | 55 |
|
56 | | -static int hp82335_take_control(gpib_board_t *board, int synchronous) |
| 56 | +static int hp82335_take_control(struct gpib_board *board, int synchronous) |
57 | 57 | { |
58 | 58 | struct hp82335_priv *priv = board->private_data; |
59 | 59 |
|
60 | 60 | return tms9914_take_control(board, &priv->tms9914_priv, synchronous); |
61 | 61 | } |
62 | 62 |
|
63 | | -static int hp82335_go_to_standby(gpib_board_t *board) |
| 63 | +static int hp82335_go_to_standby(struct gpib_board *board) |
64 | 64 | { |
65 | 65 | struct hp82335_priv *priv = board->private_data; |
66 | 66 |
|
67 | 67 | return tms9914_go_to_standby(board, &priv->tms9914_priv); |
68 | 68 | } |
69 | 69 |
|
70 | | -static void hp82335_request_system_control(gpib_board_t *board, int request_control) |
| 70 | +static void hp82335_request_system_control(struct gpib_board *board, int request_control) |
71 | 71 | { |
72 | 72 | struct hp82335_priv *priv = board->private_data; |
73 | 73 |
|
74 | 74 | tms9914_request_system_control(board, &priv->tms9914_priv, request_control); |
75 | 75 | } |
76 | 76 |
|
77 | | -static void hp82335_interface_clear(gpib_board_t *board, int assert) |
| 77 | +static void hp82335_interface_clear(struct gpib_board *board, int assert) |
78 | 78 | { |
79 | 79 | struct hp82335_priv *priv = board->private_data; |
80 | 80 |
|
81 | 81 | tms9914_interface_clear(board, &priv->tms9914_priv, assert); |
82 | 82 | } |
83 | 83 |
|
84 | | -static void hp82335_remote_enable(gpib_board_t *board, int enable) |
| 84 | +static void hp82335_remote_enable(struct gpib_board *board, int enable) |
85 | 85 | { |
86 | 86 | struct hp82335_priv *priv = board->private_data; |
87 | 87 |
|
88 | 88 | tms9914_remote_enable(board, &priv->tms9914_priv, enable); |
89 | 89 | } |
90 | 90 |
|
91 | | -static int hp82335_enable_eos(gpib_board_t *board, uint8_t eos_byte, int compare_8_bits) |
| 91 | +static int hp82335_enable_eos(struct gpib_board *board, uint8_t eos_byte, int compare_8_bits) |
92 | 92 | { |
93 | 93 | struct hp82335_priv *priv = board->private_data; |
94 | 94 |
|
95 | 95 | return tms9914_enable_eos(board, &priv->tms9914_priv, eos_byte, compare_8_bits); |
96 | 96 | } |
97 | 97 |
|
98 | | -static void hp82335_disable_eos(gpib_board_t *board) |
| 98 | +static void hp82335_disable_eos(struct gpib_board *board) |
99 | 99 | { |
100 | 100 | struct hp82335_priv *priv = board->private_data; |
101 | 101 |
|
102 | 102 | tms9914_disable_eos(board, &priv->tms9914_priv); |
103 | 103 | } |
104 | 104 |
|
105 | | -static unsigned int hp82335_update_status(gpib_board_t *board, unsigned int clear_mask) |
| 105 | +static unsigned int hp82335_update_status(struct gpib_board *board, unsigned int clear_mask) |
106 | 106 | { |
107 | 107 | struct hp82335_priv *priv = board->private_data; |
108 | 108 |
|
109 | 109 | return tms9914_update_status(board, &priv->tms9914_priv, clear_mask); |
110 | 110 | } |
111 | 111 |
|
112 | | -static int hp82335_primary_address(gpib_board_t *board, unsigned int address) |
| 112 | +static int hp82335_primary_address(struct gpib_board *board, unsigned int address) |
113 | 113 | { |
114 | 114 | struct hp82335_priv *priv = board->private_data; |
115 | 115 |
|
116 | 116 | return tms9914_primary_address(board, &priv->tms9914_priv, address); |
117 | 117 | } |
118 | 118 |
|
119 | | -static int hp82335_secondary_address(gpib_board_t *board, unsigned int address, int enable) |
| 119 | +static int hp82335_secondary_address(struct gpib_board *board, unsigned int address, int enable) |
120 | 120 | { |
121 | 121 | struct hp82335_priv *priv = board->private_data; |
122 | 122 |
|
123 | 123 | return tms9914_secondary_address(board, &priv->tms9914_priv, address, enable); |
124 | 124 | } |
125 | 125 |
|
126 | | -static int hp82335_parallel_poll(gpib_board_t *board, uint8_t *result) |
| 126 | +static int hp82335_parallel_poll(struct gpib_board *board, uint8_t *result) |
127 | 127 | { |
128 | 128 | struct hp82335_priv *priv = board->private_data; |
129 | 129 |
|
130 | 130 | return tms9914_parallel_poll(board, &priv->tms9914_priv, result); |
131 | 131 | } |
132 | 132 |
|
133 | | -static void hp82335_parallel_poll_configure(gpib_board_t *board, uint8_t config) |
| 133 | +static void hp82335_parallel_poll_configure(struct gpib_board *board, uint8_t config) |
134 | 134 | { |
135 | 135 | struct hp82335_priv *priv = board->private_data; |
136 | 136 |
|
137 | 137 | tms9914_parallel_poll_configure(board, &priv->tms9914_priv, config); |
138 | 138 | } |
139 | 139 |
|
140 | | -static void hp82335_parallel_poll_response(gpib_board_t *board, int ist) |
| 140 | +static void hp82335_parallel_poll_response(struct gpib_board *board, int ist) |
141 | 141 | { |
142 | 142 | struct hp82335_priv *priv = board->private_data; |
143 | 143 |
|
144 | 144 | tms9914_parallel_poll_response(board, &priv->tms9914_priv, ist); |
145 | 145 | } |
146 | 146 |
|
147 | | -static void hp82335_serial_poll_response(gpib_board_t *board, uint8_t status) |
| 147 | +static void hp82335_serial_poll_response(struct gpib_board *board, uint8_t status) |
148 | 148 | { |
149 | 149 | struct hp82335_priv *priv = board->private_data; |
150 | 150 |
|
151 | 151 | tms9914_serial_poll_response(board, &priv->tms9914_priv, status); |
152 | 152 | } |
153 | 153 |
|
154 | | -static uint8_t hp82335_serial_poll_status(gpib_board_t *board) |
| 154 | +static uint8_t hp82335_serial_poll_status(struct gpib_board *board) |
155 | 155 | { |
156 | 156 | struct hp82335_priv *priv = board->private_data; |
157 | 157 |
|
158 | 158 | return tms9914_serial_poll_status(board, &priv->tms9914_priv); |
159 | 159 | } |
160 | 160 |
|
161 | | -static int hp82335_line_status(const gpib_board_t *board) |
| 161 | +static int hp82335_line_status(const struct gpib_board *board) |
162 | 162 | { |
163 | 163 | struct hp82335_priv *priv = board->private_data; |
164 | 164 |
|
165 | 165 | return tms9914_line_status(board, &priv->tms9914_priv); |
166 | 166 | } |
167 | 167 |
|
168 | | -static unsigned int hp82335_t1_delay(gpib_board_t *board, unsigned int nano_sec) |
| 168 | +static unsigned int hp82335_t1_delay(struct gpib_board *board, unsigned int nano_sec) |
169 | 169 | { |
170 | 170 | struct hp82335_priv *priv = board->private_data; |
171 | 171 |
|
172 | 172 | return tms9914_t1_delay(board, &priv->tms9914_priv, nano_sec); |
173 | 173 | } |
174 | 174 |
|
175 | | -static void hp82335_return_to_local(gpib_board_t *board) |
| 175 | +static void hp82335_return_to_local(struct gpib_board *board) |
176 | 176 | { |
177 | 177 | struct hp82335_priv *priv = board->private_data; |
178 | 178 |
|
@@ -207,15 +207,15 @@ static gpib_interface_t hp82335_interface = { |
207 | 207 | .return_to_local = hp82335_return_to_local, |
208 | 208 | }; |
209 | 209 |
|
210 | | -static int hp82335_allocate_private(gpib_board_t *board) |
| 210 | +static int hp82335_allocate_private(struct gpib_board *board) |
211 | 211 | { |
212 | 212 | board->private_data = kzalloc(sizeof(struct hp82335_priv), GFP_KERNEL); |
213 | 213 | if (!board->private_data) |
214 | 214 | return -1; |
215 | 215 | return 0; |
216 | 216 | } |
217 | 217 |
|
218 | | -static void hp82335_free_private(gpib_board_t *board) |
| 218 | +static void hp82335_free_private(struct gpib_board *board) |
219 | 219 | { |
220 | 220 | kfree(board->private_data); |
221 | 221 | board->private_data = NULL; |
@@ -243,7 +243,7 @@ static void hp82335_clear_interrupt(struct hp82335_priv *hp_priv) |
243 | 243 | writeb(0, tms_priv->mmiobase + HPREG_INTR_CLEAR); |
244 | 244 | } |
245 | 245 |
|
246 | | -static int hp82335_attach(gpib_board_t *board, const gpib_board_config_t *config) |
| 246 | +static int hp82335_attach(struct gpib_board *board, const gpib_board_config_t *config) |
247 | 247 | { |
248 | 248 | struct hp82335_priv *hp_priv; |
249 | 249 | struct tms9914_priv *tms_priv; |
@@ -307,7 +307,7 @@ static int hp82335_attach(gpib_board_t *board, const gpib_board_config_t *config |
307 | 307 | return 0; |
308 | 308 | } |
309 | 309 |
|
310 | | -static void hp82335_detach(gpib_board_t *board) |
| 310 | +static void hp82335_detach(struct gpib_board *board) |
311 | 311 | { |
312 | 312 | struct hp82335_priv *hp_priv = board->private_data; |
313 | 313 | struct tms9914_priv *tms_priv; |
@@ -354,7 +354,7 @@ module_exit(hp82335_exit_module); |
354 | 354 | static irqreturn_t hp82335_interrupt(int irq, void *arg) |
355 | 355 | { |
356 | 356 | int status1, status2; |
357 | | - gpib_board_t *board = arg; |
| 357 | + struct gpib_board *board = arg; |
358 | 358 | struct hp82335_priv *priv = board->private_data; |
359 | 359 | unsigned long flags; |
360 | 360 | irqreturn_t retval; |
|
0 commit comments