diff options
author | H Hartley Sweeten <[email protected]> | 2014-07-28 10:26:59 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2014-07-30 16:51:00 -0700 |
commit | fcf6560c52f0e29569ed5b2d41e64a1360d955a0 (patch) | |
tree | 1339b8eed57b001c94f43b9f7c0c2dd0809b1cbf | |
parent | 4bf9d435b2e82d12f663706de32c286f423a43d4 (diff) |
staging: comedi: ni_tio: tidy up Gi_Status_Bits
Convert this enum into defines and rename the CamelCase symbols.
For aesthetics, move the new defines so they are associated with
the register define.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_tio_internal.h | 9 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_tiocmd.c | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/ni_tio_internal.h b/drivers/staging/comedi/drivers/ni_tio_internal.h index 8d1b254c37aa..37cdb4960803 100644 --- a/drivers/staging/comedi/drivers/ni_tio_internal.h +++ b/drivers/staging/comedi/drivers/ni_tio_internal.h @@ -149,14 +149,11 @@ #define GI_TC_INTERRUPT_ACK (1 << 14) #define GI_GATE_INTERRUPT_ACK (1 << 15) #define NITIO_STATUS_REG(x) (NITIO_G0_STATUS + (x)) +#define GI_GATE_INTERRUPT (1 << 2) +#define GI_TC (1 << 3) +#define GI_INTERRUPT (1 << 15) #define NITIO_INT_ENA_REG(x) (NITIO_G0_INT_ENA + (x)) -enum Gi_Status_Bits { - Gi_Gate_Interrupt_Bit = 0x4, - Gi_TC_Bit = 0x8, - Gi_Interrupt_Bit = 0x8000 -}; - enum G02_Interrupt_Enable_Bits { G0_TC_Interrupt_Enable_Bit = 0x40, G0_Gate_Interrupt_Enable_Bit = 0x100 diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c index 43a7bee55052..3ec8995f0cf4 100644 --- a/drivers/staging/comedi/drivers/ni_tiocmd.c +++ b/drivers/staging/comedi/drivers/ni_tiocmd.c @@ -394,9 +394,9 @@ void ni_tio_acknowledge_and_confirm(struct ni_gpct *counter, int *gate_error, if (tc_error) *tc_error = 1; } - if (gi_status & Gi_TC_Bit) + if (gi_status & GI_TC) ack |= GI_TC_INTERRUPT_ACK; - if (gi_status & Gi_Gate_Interrupt_Bit) { + if (gi_status & GI_GATE_INTERRUPT) { if (should_ack_gate(counter)) ack |= GI_GATE_INTERRUPT_ACK; } |