Skip to content

Commit 1691b2e

Browse files
Michael Rubingregkh
authored andcommitted
staging: gpib: hp2335: struct gpib_board
Using Linux code style for struct gpib_board. Adhering to Linux code style. In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin <[email protected]> Acked-By: Dave Penkler <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d2167c0 commit 1691b2e

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

drivers/staging/gpib/hp_82335/hp82335.c

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,155 +24,155 @@
2424
MODULE_LICENSE("GPL");
2525
MODULE_DESCRIPTION("GPIB driver for HP 82335 interface cards");
2626

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);
2929
static irqreturn_t hp82335_interrupt(int irq, void *arg);
3030

3131
// 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,
3333
int *end, size_t *bytes_read)
3434
{
3535
struct hp82335_priv *priv = board->private_data;
3636

3737
return tms9914_read(board, &priv->tms9914_priv, buffer, length, end, bytes_read);
3838
}
3939

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,
4141
size_t *bytes_written)
4242
{
4343
struct hp82335_priv *priv = board->private_data;
4444

4545
return tms9914_write(board, &priv->tms9914_priv, buffer, length, send_eoi, bytes_written);
4646
}
4747

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,
4949
size_t *bytes_written)
5050
{
5151
struct hp82335_priv *priv = board->private_data;
5252

5353
return tms9914_command(board, &priv->tms9914_priv, buffer, length, bytes_written);
5454
}
5555

56-
static int hp82335_take_control(gpib_board_t *board, int synchronous)
56+
static int hp82335_take_control(struct gpib_board *board, int synchronous)
5757
{
5858
struct hp82335_priv *priv = board->private_data;
5959

6060
return tms9914_take_control(board, &priv->tms9914_priv, synchronous);
6161
}
6262

63-
static int hp82335_go_to_standby(gpib_board_t *board)
63+
static int hp82335_go_to_standby(struct gpib_board *board)
6464
{
6565
struct hp82335_priv *priv = board->private_data;
6666

6767
return tms9914_go_to_standby(board, &priv->tms9914_priv);
6868
}
6969

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)
7171
{
7272
struct hp82335_priv *priv = board->private_data;
7373

7474
tms9914_request_system_control(board, &priv->tms9914_priv, request_control);
7575
}
7676

77-
static void hp82335_interface_clear(gpib_board_t *board, int assert)
77+
static void hp82335_interface_clear(struct gpib_board *board, int assert)
7878
{
7979
struct hp82335_priv *priv = board->private_data;
8080

8181
tms9914_interface_clear(board, &priv->tms9914_priv, assert);
8282
}
8383

84-
static void hp82335_remote_enable(gpib_board_t *board, int enable)
84+
static void hp82335_remote_enable(struct gpib_board *board, int enable)
8585
{
8686
struct hp82335_priv *priv = board->private_data;
8787

8888
tms9914_remote_enable(board, &priv->tms9914_priv, enable);
8989
}
9090

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)
9292
{
9393
struct hp82335_priv *priv = board->private_data;
9494

9595
return tms9914_enable_eos(board, &priv->tms9914_priv, eos_byte, compare_8_bits);
9696
}
9797

98-
static void hp82335_disable_eos(gpib_board_t *board)
98+
static void hp82335_disable_eos(struct gpib_board *board)
9999
{
100100
struct hp82335_priv *priv = board->private_data;
101101

102102
tms9914_disable_eos(board, &priv->tms9914_priv);
103103
}
104104

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)
106106
{
107107
struct hp82335_priv *priv = board->private_data;
108108

109109
return tms9914_update_status(board, &priv->tms9914_priv, clear_mask);
110110
}
111111

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)
113113
{
114114
struct hp82335_priv *priv = board->private_data;
115115

116116
return tms9914_primary_address(board, &priv->tms9914_priv, address);
117117
}
118118

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)
120120
{
121121
struct hp82335_priv *priv = board->private_data;
122122

123123
return tms9914_secondary_address(board, &priv->tms9914_priv, address, enable);
124124
}
125125

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)
127127
{
128128
struct hp82335_priv *priv = board->private_data;
129129

130130
return tms9914_parallel_poll(board, &priv->tms9914_priv, result);
131131
}
132132

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)
134134
{
135135
struct hp82335_priv *priv = board->private_data;
136136

137137
tms9914_parallel_poll_configure(board, &priv->tms9914_priv, config);
138138
}
139139

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)
141141
{
142142
struct hp82335_priv *priv = board->private_data;
143143

144144
tms9914_parallel_poll_response(board, &priv->tms9914_priv, ist);
145145
}
146146

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)
148148
{
149149
struct hp82335_priv *priv = board->private_data;
150150

151151
tms9914_serial_poll_response(board, &priv->tms9914_priv, status);
152152
}
153153

154-
static uint8_t hp82335_serial_poll_status(gpib_board_t *board)
154+
static uint8_t hp82335_serial_poll_status(struct gpib_board *board)
155155
{
156156
struct hp82335_priv *priv = board->private_data;
157157

158158
return tms9914_serial_poll_status(board, &priv->tms9914_priv);
159159
}
160160

161-
static int hp82335_line_status(const gpib_board_t *board)
161+
static int hp82335_line_status(const struct gpib_board *board)
162162
{
163163
struct hp82335_priv *priv = board->private_data;
164164

165165
return tms9914_line_status(board, &priv->tms9914_priv);
166166
}
167167

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)
169169
{
170170
struct hp82335_priv *priv = board->private_data;
171171

172172
return tms9914_t1_delay(board, &priv->tms9914_priv, nano_sec);
173173
}
174174

175-
static void hp82335_return_to_local(gpib_board_t *board)
175+
static void hp82335_return_to_local(struct gpib_board *board)
176176
{
177177
struct hp82335_priv *priv = board->private_data;
178178

@@ -207,15 +207,15 @@ static gpib_interface_t hp82335_interface = {
207207
.return_to_local = hp82335_return_to_local,
208208
};
209209

210-
static int hp82335_allocate_private(gpib_board_t *board)
210+
static int hp82335_allocate_private(struct gpib_board *board)
211211
{
212212
board->private_data = kzalloc(sizeof(struct hp82335_priv), GFP_KERNEL);
213213
if (!board->private_data)
214214
return -1;
215215
return 0;
216216
}
217217

218-
static void hp82335_free_private(gpib_board_t *board)
218+
static void hp82335_free_private(struct gpib_board *board)
219219
{
220220
kfree(board->private_data);
221221
board->private_data = NULL;
@@ -243,7 +243,7 @@ static void hp82335_clear_interrupt(struct hp82335_priv *hp_priv)
243243
writeb(0, tms_priv->mmiobase + HPREG_INTR_CLEAR);
244244
}
245245

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)
247247
{
248248
struct hp82335_priv *hp_priv;
249249
struct tms9914_priv *tms_priv;
@@ -307,7 +307,7 @@ static int hp82335_attach(gpib_board_t *board, const gpib_board_config_t *config
307307
return 0;
308308
}
309309

310-
static void hp82335_detach(gpib_board_t *board)
310+
static void hp82335_detach(struct gpib_board *board)
311311
{
312312
struct hp82335_priv *hp_priv = board->private_data;
313313
struct tms9914_priv *tms_priv;
@@ -354,7 +354,7 @@ module_exit(hp82335_exit_module);
354354
static irqreturn_t hp82335_interrupt(int irq, void *arg)
355355
{
356356
int status1, status2;
357-
gpib_board_t *board = arg;
357+
struct gpib_board *board = arg;
358358
struct hp82335_priv *priv = board->private_data;
359359
unsigned long flags;
360360
irqreturn_t retval;

0 commit comments

Comments
 (0)