Skip to content

Commit 82184cc

Browse files
Michael Rubingregkh
authored andcommitted
staging: gpib: Correct CamelCase for BUS constants
Adhere to Linux kernel coding style and remove duplicate enums. Reported by checkpatch CHECK: Avoid CamelCase 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 8491e73 commit 82184cc

File tree

13 files changed

+83
-94
lines changed

13 files changed

+83
-94
lines changed

drivers/staging/gpib/agilent_82357a/agilent_82357a.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,21 +1030,21 @@ static int agilent_82357a_line_status(const gpib_board_t *board)
10301030
return retval;
10311031
}
10321032
if (bus_status.value & BSR_REN_BIT)
1033-
status |= BusREN;
1033+
status |= BUS_REN;
10341034
if (bus_status.value & BSR_IFC_BIT)
1035-
status |= BusIFC;
1035+
status |= BUS_IFC;
10361036
if (bus_status.value & BSR_SRQ_BIT)
1037-
status |= BusSRQ;
1037+
status |= BUS_SRQ;
10381038
if (bus_status.value & BSR_EOI_BIT)
1039-
status |= BusEOI;
1039+
status |= BUS_EOI;
10401040
if (bus_status.value & BSR_NRFD_BIT)
1041-
status |= BusNRFD;
1041+
status |= BUS_NRFD;
10421042
if (bus_status.value & BSR_NDAC_BIT)
1043-
status |= BusNDAC;
1043+
status |= BUS_NDAC;
10441044
if (bus_status.value & BSR_DAV_BIT)
1045-
status |= BusDAV;
1045+
status |= BUS_DAV;
10461046
if (bus_status.value & BSR_ATN_BIT)
1047-
status |= BusATN;
1047+
status |= BUS_ATN;
10481048
return status;
10491049
}
10501050

drivers/staging/gpib/cb7210/cb7210.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,21 +388,21 @@ static int cb7210_line_status(const gpib_board_t *board)
388388
bsr_bits = cb7210_paged_read_byte(cb_priv, BUS_STATUS, BUS_STATUS_PAGE);
389389

390390
if ((bsr_bits & BSR_REN_BIT) == 0)
391-
status |= BusREN;
391+
status |= BUS_REN;
392392
if ((bsr_bits & BSR_IFC_BIT) == 0)
393-
status |= BusIFC;
393+
status |= BUS_IFC;
394394
if ((bsr_bits & BSR_SRQ_BIT) == 0)
395-
status |= BusSRQ;
395+
status |= BUS_SRQ;
396396
if ((bsr_bits & BSR_EOI_BIT) == 0)
397-
status |= BusEOI;
397+
status |= BUS_EOI;
398398
if ((bsr_bits & BSR_NRFD_BIT) == 0)
399-
status |= BusNRFD;
399+
status |= BUS_NRFD;
400400
if ((bsr_bits & BSR_NDAC_BIT) == 0)
401-
status |= BusNDAC;
401+
status |= BUS_NDAC;
402402
if ((bsr_bits & BSR_DAV_BIT) == 0)
403-
status |= BusDAV;
403+
status |= BUS_DAV;
404404
if ((bsr_bits & BSR_ATN_BIT) == 0)
405-
status |= BusATN;
405+
status |= BUS_ATN;
406406

407407
return status;
408408
}

drivers/staging/gpib/common/iblib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int check_for_command_acceptors(gpib_board_t *board)
7777
return lines;
7878

7979
if ((lines & ValidNRFD) && (lines & ValidNDAC)) {
80-
if ((lines & BusNRFD) == 0 && (lines & BusNDAC) == 0)
80+
if ((lines & BUS_NRFD) == 0 && (lines & BUS_NDAC) == 0)
8181
return -ENOTCONN;
8282
}
8383

@@ -521,7 +521,7 @@ int general_ibstatus(gpib_board_t *board, const gpib_status_queue_t *device,
521521
/* get real SRQI status if we can */
522522
if (iblines(board, &line_status) == 0) {
523523
if ((line_status & ValidSRQ)) {
524-
if ((line_status & BusSRQ))
524+
if ((line_status & BUS_SRQ))
525525
status |= SRQI;
526526
else
527527
status &= ~SRQI;

drivers/staging/gpib/eastwood/fluke_gpib.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,21 +204,21 @@ static int fluke_line_status(const gpib_board_t *board)
204204
bsr_bits = fluke_paged_read_byte(e_priv, BUS_STATUS, BUS_STATUS_PAGE);
205205

206206
if ((bsr_bits & BSR_REN_BIT) == 0)
207-
status |= BusREN;
207+
status |= BUS_REN;
208208
if ((bsr_bits & BSR_IFC_BIT) == 0)
209-
status |= BusIFC;
209+
status |= BUS_IFC;
210210
if ((bsr_bits & BSR_SRQ_BIT) == 0)
211-
status |= BusSRQ;
211+
status |= BUS_SRQ;
212212
if ((bsr_bits & BSR_EOI_BIT) == 0)
213-
status |= BusEOI;
213+
status |= BUS_EOI;
214214
if ((bsr_bits & BSR_NRFD_BIT) == 0)
215-
status |= BusNRFD;
215+
status |= BUS_NRFD;
216216
if ((bsr_bits & BSR_NDAC_BIT) == 0)
217-
status |= BusNDAC;
217+
status |= BUS_NDAC;
218218
if ((bsr_bits & BSR_DAV_BIT) == 0)
219-
status |= BusDAV;
219+
status |= BUS_DAV;
220220
if ((bsr_bits & BSR_ATN_BIT) == 0)
221-
status |= BusATN;
221+
status |= BUS_ATN;
222222

223223
return status;
224224
}

drivers/staging/gpib/fmh_gpib/fmh_gpib.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,21 +240,21 @@ static int fmh_gpib_line_status(const gpib_board_t *board)
240240
bsr_bits = read_byte(nec_priv, BUS_STATUS_REG);
241241

242242
if ((bsr_bits & BSR_REN_BIT) == 0)
243-
status |= BusREN;
243+
status |= BUS_REN;
244244
if ((bsr_bits & BSR_IFC_BIT) == 0)
245-
status |= BusIFC;
245+
status |= BUS_IFC;
246246
if ((bsr_bits & BSR_SRQ_BIT) == 0)
247-
status |= BusSRQ;
247+
status |= BUS_SRQ;
248248
if ((bsr_bits & BSR_EOI_BIT) == 0)
249-
status |= BusEOI;
249+
status |= BUS_EOI;
250250
if ((bsr_bits & BSR_NRFD_BIT) == 0)
251-
status |= BusNRFD;
251+
status |= BUS_NRFD;
252252
if ((bsr_bits & BSR_NDAC_BIT) == 0)
253-
status |= BusNDAC;
253+
status |= BUS_NDAC;
254254
if ((bsr_bits & BSR_DAV_BIT) == 0)
255-
status |= BusDAV;
255+
status |= BUS_DAV;
256256
if ((bsr_bits & BSR_ATN_BIT) == 0)
257-
status |= BusATN;
257+
status |= BUS_ATN;
258258

259259
return status;
260260
}

drivers/staging/gpib/gpio/gpib_bitbang.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,21 +1034,21 @@ static int bb_line_status(const gpib_board_t *board)
10341034
int line_status = ValidALL;
10351035

10361036
if (gpiod_get_value(REN) == 0)
1037-
line_status |= BusREN;
1037+
line_status |= BUS_REN;
10381038
if (gpiod_get_value(IFC) == 0)
1039-
line_status |= BusIFC;
1039+
line_status |= BUS_IFC;
10401040
if (gpiod_get_value(NDAC) == 0)
1041-
line_status |= BusNDAC;
1041+
line_status |= BUS_NDAC;
10421042
if (gpiod_get_value(NRFD) == 0)
1043-
line_status |= BusNRFD;
1043+
line_status |= BUS_NRFD;
10441044
if (gpiod_get_value(DAV) == 0)
1045-
line_status |= BusDAV;
1045+
line_status |= BUS_DAV;
10461046
if (gpiod_get_value(EOI) == 0)
1047-
line_status |= BusEOI;
1047+
line_status |= BUS_EOI;
10481048
if (gpiod_get_value(_ATN) == 0)
1049-
line_status |= BusATN;
1049+
line_status |= BUS_ATN;
10501050
if (gpiod_get_value(SRQ) == 0)
1051-
line_status |= BusSRQ;
1051+
line_status |= BUS_SRQ;
10521052

10531053
dbg_printk(2, "status lines: %4x\n", line_status);
10541054

drivers/staging/gpib/hp_82341/hp_82341.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int restart_write_fifo(gpib_board_t *board, struct hp_82341_priv *hp_priv
158158

159159
//restart doesn't work if data holdoff is in effect
160160
status = tms9914_line_status(board, tms_priv);
161-
if ((status & BusNRFD) == 0) {
161+
if ((status & BUS_NRFD) == 0) {
162162
outb(RESTART_STREAM_BIT, hp_priv->iobase[0] + STREAM_STATUS_REG);
163163
return 0;
164164
}

drivers/staging/gpib/ines/ines_gpib.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ int ines_line_status(const gpib_board_t *board)
3636
bcm_bits = ines_inb(ines_priv, BUS_CONTROL_MONITOR);
3737

3838
if (bcm_bits & BCM_REN_BIT)
39-
status |= BusREN;
39+
status |= BUS_REN;
4040
if (bcm_bits & BCM_IFC_BIT)
41-
status |= BusIFC;
41+
status |= BUS_IFC;
4242
if (bcm_bits & BCM_SRQ_BIT)
43-
status |= BusSRQ;
43+
status |= BUS_SRQ;
4444
if (bcm_bits & BCM_EOI_BIT)
45-
status |= BusEOI;
45+
status |= BUS_EOI;
4646
if (bcm_bits & BCM_NRFD_BIT)
47-
status |= BusNRFD;
47+
status |= BUS_NRFD;
4848
if (bcm_bits & BCM_NDAC_BIT)
49-
status |= BusNDAC;
49+
status |= BUS_NDAC;
5050
if (bcm_bits & BCM_DAV_BIT)
51-
status |= BusDAV;
51+
status |= BUS_DAV;
5252
if (bcm_bits & BCM_ATN_BIT)
53-
status |= BusATN;
53+
status |= BUS_ATN;
5454

5555
return status;
5656
}

drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -694,21 +694,21 @@ static int usb_gpib_line_status(const gpib_board_t *board)
694694
}
695695

696696
if ((buffer & 0x01) == 0)
697-
line_status |= BusREN;
697+
line_status |= BUS_REN;
698698
if ((buffer & 0x02) == 0)
699-
line_status |= BusIFC;
699+
line_status |= BUS_IFC;
700700
if ((buffer & 0x04) == 0)
701-
line_status |= BusNDAC;
701+
line_status |= BUS_NDAC;
702702
if ((buffer & 0x08) == 0)
703-
line_status |= BusNRFD;
703+
line_status |= BUS_NRFD;
704704
if ((buffer & 0x10) == 0)
705-
line_status |= BusDAV;
705+
line_status |= BUS_DAV;
706706
if ((buffer & 0x20) == 0)
707-
line_status |= BusEOI;
707+
line_status |= BUS_EOI;
708708
if ((buffer & 0x40) == 0)
709-
line_status |= BusATN;
709+
line_status |= BUS_ATN;
710710
if ((buffer & 0x80) == 0)
711-
line_status |= BusSRQ;
711+
line_status |= BUS_SRQ;
712712

713713
DIA_LOG(1, "done with %x %x\n", buffer, line_status);
714714

drivers/staging/gpib/ni_usb/ni_usb_gpib.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,21 +1561,21 @@ static int ni_usb_line_status(const gpib_board_t *board)
15611561
ni_usb_parse_register_read_block(in_data, &bsr_bits, 1);
15621562
kfree(in_data);
15631563
if (bsr_bits & BCSR_REN_BIT)
1564-
line_status |= BusREN;
1564+
line_status |= BUS_REN;
15651565
if (bsr_bits & BCSR_IFC_BIT)
1566-
line_status |= BusIFC;
1566+
line_status |= BUS_IFC;
15671567
if (bsr_bits & BCSR_SRQ_BIT)
1568-
line_status |= BusSRQ;
1568+
line_status |= BUS_SRQ;
15691569
if (bsr_bits & BCSR_EOI_BIT)
1570-
line_status |= BusEOI;
1570+
line_status |= BUS_EOI;
15711571
if (bsr_bits & BCSR_NRFD_BIT)
1572-
line_status |= BusNRFD;
1572+
line_status |= BUS_NRFD;
15731573
if (bsr_bits & BCSR_NDAC_BIT)
1574-
line_status |= BusNDAC;
1574+
line_status |= BUS_NDAC;
15751575
if (bsr_bits & BCSR_DAV_BIT)
1576-
line_status |= BusDAV;
1576+
line_status |= BUS_DAV;
15771577
if (bsr_bits & BCSR_ATN_BIT)
1578-
line_status |= BusATN;
1578+
line_status |= BUS_ATN;
15791579
return line_status;
15801580
}
15811581

0 commit comments

Comments
 (0)