mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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 <matchstick@neverthere.org> Acked-By: Dave Penkler <dpenkler@gmail.com> Link: https://lore.kernel.org/r/20250319211827.9854-2-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8491e73a52
commit
82184cc117
|
|
@ -1030,21 +1030,21 @@ static int agilent_82357a_line_status(const gpib_board_t *board)
|
|||
return retval;
|
||||
}
|
||||
if (bus_status.value & BSR_REN_BIT)
|
||||
status |= BusREN;
|
||||
status |= BUS_REN;
|
||||
if (bus_status.value & BSR_IFC_BIT)
|
||||
status |= BusIFC;
|
||||
status |= BUS_IFC;
|
||||
if (bus_status.value & BSR_SRQ_BIT)
|
||||
status |= BusSRQ;
|
||||
status |= BUS_SRQ;
|
||||
if (bus_status.value & BSR_EOI_BIT)
|
||||
status |= BusEOI;
|
||||
status |= BUS_EOI;
|
||||
if (bus_status.value & BSR_NRFD_BIT)
|
||||
status |= BusNRFD;
|
||||
status |= BUS_NRFD;
|
||||
if (bus_status.value & BSR_NDAC_BIT)
|
||||
status |= BusNDAC;
|
||||
status |= BUS_NDAC;
|
||||
if (bus_status.value & BSR_DAV_BIT)
|
||||
status |= BusDAV;
|
||||
status |= BUS_DAV;
|
||||
if (bus_status.value & BSR_ATN_BIT)
|
||||
status |= BusATN;
|
||||
status |= BUS_ATN;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -388,21 +388,21 @@ static int cb7210_line_status(const gpib_board_t *board)
|
|||
bsr_bits = cb7210_paged_read_byte(cb_priv, BUS_STATUS, BUS_STATUS_PAGE);
|
||||
|
||||
if ((bsr_bits & BSR_REN_BIT) == 0)
|
||||
status |= BusREN;
|
||||
status |= BUS_REN;
|
||||
if ((bsr_bits & BSR_IFC_BIT) == 0)
|
||||
status |= BusIFC;
|
||||
status |= BUS_IFC;
|
||||
if ((bsr_bits & BSR_SRQ_BIT) == 0)
|
||||
status |= BusSRQ;
|
||||
status |= BUS_SRQ;
|
||||
if ((bsr_bits & BSR_EOI_BIT) == 0)
|
||||
status |= BusEOI;
|
||||
status |= BUS_EOI;
|
||||
if ((bsr_bits & BSR_NRFD_BIT) == 0)
|
||||
status |= BusNRFD;
|
||||
status |= BUS_NRFD;
|
||||
if ((bsr_bits & BSR_NDAC_BIT) == 0)
|
||||
status |= BusNDAC;
|
||||
status |= BUS_NDAC;
|
||||
if ((bsr_bits & BSR_DAV_BIT) == 0)
|
||||
status |= BusDAV;
|
||||
status |= BUS_DAV;
|
||||
if ((bsr_bits & BSR_ATN_BIT) == 0)
|
||||
status |= BusATN;
|
||||
status |= BUS_ATN;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ static int check_for_command_acceptors(gpib_board_t *board)
|
|||
return lines;
|
||||
|
||||
if ((lines & ValidNRFD) && (lines & ValidNDAC)) {
|
||||
if ((lines & BusNRFD) == 0 && (lines & BusNDAC) == 0)
|
||||
if ((lines & BUS_NRFD) == 0 && (lines & BUS_NDAC) == 0)
|
||||
return -ENOTCONN;
|
||||
}
|
||||
|
||||
|
|
@ -521,7 +521,7 @@ int general_ibstatus(gpib_board_t *board, const gpib_status_queue_t *device,
|
|||
/* get real SRQI status if we can */
|
||||
if (iblines(board, &line_status) == 0) {
|
||||
if ((line_status & ValidSRQ)) {
|
||||
if ((line_status & BusSRQ))
|
||||
if ((line_status & BUS_SRQ))
|
||||
status |= SRQI;
|
||||
else
|
||||
status &= ~SRQI;
|
||||
|
|
|
|||
|
|
@ -204,21 +204,21 @@ static int fluke_line_status(const gpib_board_t *board)
|
|||
bsr_bits = fluke_paged_read_byte(e_priv, BUS_STATUS, BUS_STATUS_PAGE);
|
||||
|
||||
if ((bsr_bits & BSR_REN_BIT) == 0)
|
||||
status |= BusREN;
|
||||
status |= BUS_REN;
|
||||
if ((bsr_bits & BSR_IFC_BIT) == 0)
|
||||
status |= BusIFC;
|
||||
status |= BUS_IFC;
|
||||
if ((bsr_bits & BSR_SRQ_BIT) == 0)
|
||||
status |= BusSRQ;
|
||||
status |= BUS_SRQ;
|
||||
if ((bsr_bits & BSR_EOI_BIT) == 0)
|
||||
status |= BusEOI;
|
||||
status |= BUS_EOI;
|
||||
if ((bsr_bits & BSR_NRFD_BIT) == 0)
|
||||
status |= BusNRFD;
|
||||
status |= BUS_NRFD;
|
||||
if ((bsr_bits & BSR_NDAC_BIT) == 0)
|
||||
status |= BusNDAC;
|
||||
status |= BUS_NDAC;
|
||||
if ((bsr_bits & BSR_DAV_BIT) == 0)
|
||||
status |= BusDAV;
|
||||
status |= BUS_DAV;
|
||||
if ((bsr_bits & BSR_ATN_BIT) == 0)
|
||||
status |= BusATN;
|
||||
status |= BUS_ATN;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,21 +240,21 @@ static int fmh_gpib_line_status(const gpib_board_t *board)
|
|||
bsr_bits = read_byte(nec_priv, BUS_STATUS_REG);
|
||||
|
||||
if ((bsr_bits & BSR_REN_BIT) == 0)
|
||||
status |= BusREN;
|
||||
status |= BUS_REN;
|
||||
if ((bsr_bits & BSR_IFC_BIT) == 0)
|
||||
status |= BusIFC;
|
||||
status |= BUS_IFC;
|
||||
if ((bsr_bits & BSR_SRQ_BIT) == 0)
|
||||
status |= BusSRQ;
|
||||
status |= BUS_SRQ;
|
||||
if ((bsr_bits & BSR_EOI_BIT) == 0)
|
||||
status |= BusEOI;
|
||||
status |= BUS_EOI;
|
||||
if ((bsr_bits & BSR_NRFD_BIT) == 0)
|
||||
status |= BusNRFD;
|
||||
status |= BUS_NRFD;
|
||||
if ((bsr_bits & BSR_NDAC_BIT) == 0)
|
||||
status |= BusNDAC;
|
||||
status |= BUS_NDAC;
|
||||
if ((bsr_bits & BSR_DAV_BIT) == 0)
|
||||
status |= BusDAV;
|
||||
status |= BUS_DAV;
|
||||
if ((bsr_bits & BSR_ATN_BIT) == 0)
|
||||
status |= BusATN;
|
||||
status |= BUS_ATN;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1034,21 +1034,21 @@ static int bb_line_status(const gpib_board_t *board)
|
|||
int line_status = ValidALL;
|
||||
|
||||
if (gpiod_get_value(REN) == 0)
|
||||
line_status |= BusREN;
|
||||
line_status |= BUS_REN;
|
||||
if (gpiod_get_value(IFC) == 0)
|
||||
line_status |= BusIFC;
|
||||
line_status |= BUS_IFC;
|
||||
if (gpiod_get_value(NDAC) == 0)
|
||||
line_status |= BusNDAC;
|
||||
line_status |= BUS_NDAC;
|
||||
if (gpiod_get_value(NRFD) == 0)
|
||||
line_status |= BusNRFD;
|
||||
line_status |= BUS_NRFD;
|
||||
if (gpiod_get_value(DAV) == 0)
|
||||
line_status |= BusDAV;
|
||||
line_status |= BUS_DAV;
|
||||
if (gpiod_get_value(EOI) == 0)
|
||||
line_status |= BusEOI;
|
||||
line_status |= BUS_EOI;
|
||||
if (gpiod_get_value(_ATN) == 0)
|
||||
line_status |= BusATN;
|
||||
line_status |= BUS_ATN;
|
||||
if (gpiod_get_value(SRQ) == 0)
|
||||
line_status |= BusSRQ;
|
||||
line_status |= BUS_SRQ;
|
||||
|
||||
dbg_printk(2, "status lines: %4x\n", line_status);
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ static int restart_write_fifo(gpib_board_t *board, struct hp_82341_priv *hp_priv
|
|||
|
||||
//restart doesn't work if data holdoff is in effect
|
||||
status = tms9914_line_status(board, tms_priv);
|
||||
if ((status & BusNRFD) == 0) {
|
||||
if ((status & BUS_NRFD) == 0) {
|
||||
outb(RESTART_STREAM_BIT, hp_priv->iobase[0] + STREAM_STATUS_REG);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,21 +36,21 @@ int ines_line_status(const gpib_board_t *board)
|
|||
bcm_bits = ines_inb(ines_priv, BUS_CONTROL_MONITOR);
|
||||
|
||||
if (bcm_bits & BCM_REN_BIT)
|
||||
status |= BusREN;
|
||||
status |= BUS_REN;
|
||||
if (bcm_bits & BCM_IFC_BIT)
|
||||
status |= BusIFC;
|
||||
status |= BUS_IFC;
|
||||
if (bcm_bits & BCM_SRQ_BIT)
|
||||
status |= BusSRQ;
|
||||
status |= BUS_SRQ;
|
||||
if (bcm_bits & BCM_EOI_BIT)
|
||||
status |= BusEOI;
|
||||
status |= BUS_EOI;
|
||||
if (bcm_bits & BCM_NRFD_BIT)
|
||||
status |= BusNRFD;
|
||||
status |= BUS_NRFD;
|
||||
if (bcm_bits & BCM_NDAC_BIT)
|
||||
status |= BusNDAC;
|
||||
status |= BUS_NDAC;
|
||||
if (bcm_bits & BCM_DAV_BIT)
|
||||
status |= BusDAV;
|
||||
status |= BUS_DAV;
|
||||
if (bcm_bits & BCM_ATN_BIT)
|
||||
status |= BusATN;
|
||||
status |= BUS_ATN;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -694,21 +694,21 @@ static int usb_gpib_line_status(const gpib_board_t *board)
|
|||
}
|
||||
|
||||
if ((buffer & 0x01) == 0)
|
||||
line_status |= BusREN;
|
||||
line_status |= BUS_REN;
|
||||
if ((buffer & 0x02) == 0)
|
||||
line_status |= BusIFC;
|
||||
line_status |= BUS_IFC;
|
||||
if ((buffer & 0x04) == 0)
|
||||
line_status |= BusNDAC;
|
||||
line_status |= BUS_NDAC;
|
||||
if ((buffer & 0x08) == 0)
|
||||
line_status |= BusNRFD;
|
||||
line_status |= BUS_NRFD;
|
||||
if ((buffer & 0x10) == 0)
|
||||
line_status |= BusDAV;
|
||||
line_status |= BUS_DAV;
|
||||
if ((buffer & 0x20) == 0)
|
||||
line_status |= BusEOI;
|
||||
line_status |= BUS_EOI;
|
||||
if ((buffer & 0x40) == 0)
|
||||
line_status |= BusATN;
|
||||
line_status |= BUS_ATN;
|
||||
if ((buffer & 0x80) == 0)
|
||||
line_status |= BusSRQ;
|
||||
line_status |= BUS_SRQ;
|
||||
|
||||
DIA_LOG(1, "done with %x %x\n", buffer, line_status);
|
||||
|
||||
|
|
|
|||
|
|
@ -1561,21 +1561,21 @@ static int ni_usb_line_status(const gpib_board_t *board)
|
|||
ni_usb_parse_register_read_block(in_data, &bsr_bits, 1);
|
||||
kfree(in_data);
|
||||
if (bsr_bits & BCSR_REN_BIT)
|
||||
line_status |= BusREN;
|
||||
line_status |= BUS_REN;
|
||||
if (bsr_bits & BCSR_IFC_BIT)
|
||||
line_status |= BusIFC;
|
||||
line_status |= BUS_IFC;
|
||||
if (bsr_bits & BCSR_SRQ_BIT)
|
||||
line_status |= BusSRQ;
|
||||
line_status |= BUS_SRQ;
|
||||
if (bsr_bits & BCSR_EOI_BIT)
|
||||
line_status |= BusEOI;
|
||||
line_status |= BUS_EOI;
|
||||
if (bsr_bits & BCSR_NRFD_BIT)
|
||||
line_status |= BusNRFD;
|
||||
line_status |= BUS_NRFD;
|
||||
if (bsr_bits & BCSR_NDAC_BIT)
|
||||
line_status |= BusNDAC;
|
||||
line_status |= BUS_NDAC;
|
||||
if (bsr_bits & BCSR_DAV_BIT)
|
||||
line_status |= BusDAV;
|
||||
line_status |= BUS_DAV;
|
||||
if (bsr_bits & BCSR_ATN_BIT)
|
||||
line_status |= BusATN;
|
||||
line_status |= BUS_ATN;
|
||||
return line_status;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -396,21 +396,21 @@ int tms9914_line_status(const gpib_board_t *board, struct tms9914_priv *priv)
|
|||
bsr_bits = read_byte(priv, BSR);
|
||||
|
||||
if (bsr_bits & BSR_REN_BIT)
|
||||
status |= BusREN;
|
||||
status |= BUS_REN;
|
||||
if (bsr_bits & BSR_IFC_BIT)
|
||||
status |= BusIFC;
|
||||
status |= BUS_IFC;
|
||||
if (bsr_bits & BSR_SRQ_BIT)
|
||||
status |= BusSRQ;
|
||||
status |= BUS_SRQ;
|
||||
if (bsr_bits & BSR_EOI_BIT)
|
||||
status |= BusEOI;
|
||||
status |= BUS_EOI;
|
||||
if (bsr_bits & BSR_NRFD_BIT)
|
||||
status |= BusNRFD;
|
||||
status |= BUS_NRFD;
|
||||
if (bsr_bits & BSR_NDAC_BIT)
|
||||
status |= BusNDAC;
|
||||
status |= BUS_NDAC;
|
||||
if (bsr_bits & BSR_DAV_BIT)
|
||||
status |= BusDAV;
|
||||
status |= BUS_DAV;
|
||||
if (bsr_bits & BSR_ATN_BIT)
|
||||
status |= BusATN;
|
||||
status |= BUS_ATN;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,21 +159,21 @@ static int tnt4882_line_status(const gpib_board_t *board)
|
|||
bcsr_bits = tnt_readb(tnt_priv, BSR);
|
||||
|
||||
if (bcsr_bits & BCSR_REN_BIT)
|
||||
status |= BusREN;
|
||||
status |= BUS_REN;
|
||||
if (bcsr_bits & BCSR_IFC_BIT)
|
||||
status |= BusIFC;
|
||||
status |= BUS_IFC;
|
||||
if (bcsr_bits & BCSR_SRQ_BIT)
|
||||
status |= BusSRQ;
|
||||
status |= BUS_SRQ;
|
||||
if (bcsr_bits & BCSR_EOI_BIT)
|
||||
status |= BusEOI;
|
||||
status |= BUS_EOI;
|
||||
if (bcsr_bits & BCSR_NRFD_BIT)
|
||||
status |= BusNRFD;
|
||||
status |= BUS_NRFD;
|
||||
if (bcsr_bits & BCSR_NDAC_BIT)
|
||||
status |= BusNDAC;
|
||||
status |= BUS_NDAC;
|
||||
if (bcsr_bits & BCSR_DAV_BIT)
|
||||
status |= BusDAV;
|
||||
status |= BUS_DAV;
|
||||
if (bcsr_bits & BCSR_ATN_BIT)
|
||||
status |= BusATN;
|
||||
status |= BUS_ATN;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,17 +115,6 @@ enum bus_control_line {
|
|||
ValidATN = 0x40,
|
||||
ValidEOI = 0x80,
|
||||
ValidALL = 0xff,
|
||||
BusDAV = 0x0100, /* DAV line status bit */
|
||||
BusNDAC = 0x0200, /* NDAC line status bit */
|
||||
BusNRFD = 0x0400, /* NRFD line status bit */
|
||||
BusIFC = 0x0800, /* IFC line status bit */
|
||||
BusREN = 0x1000, /* REN line status bit */
|
||||
BusSRQ = 0x2000, /* SRQ line status bit */
|
||||
BusATN = 0x4000, /* ATN line status bit */
|
||||
BusEOI = 0x8000 /* EOI line status bit */
|
||||
};
|
||||
|
||||
enum old_bus_control_line {
|
||||
BUS_DAV = 0x0100, /* DAV line status bit */
|
||||
BUS_NDAC = 0x0200, /* NDAC line status bit */
|
||||
BUS_NRFD = 0x0400, /* NRFD line status bit */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user