From 923de26e74a5fe944e9a2f0301342a73db05f3b4 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 28 Jul 2014 10:26:57 -0700 Subject: [PATCH] staging: comedi: ni_tio: tidy up Gi_DMA_Status_Reg_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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_tio_internal.h | 9 +++------ drivers/staging/comedi/drivers/ni_tiocmd.c | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_tio_internal.h b/drivers/staging/comedi/drivers/ni_tio_internal.h index a74cec40611c..db6b56307db9 100644 --- a/drivers/staging/comedi/drivers/ni_tio_internal.h +++ b/drivers/staging/comedi/drivers/ni_tio_internal.h @@ -139,17 +139,14 @@ #define GI_DMA_RESET (1 << 3) #define GI_DMA_BANKSW_ERROR (1 << 4) #define NITIO_DMA_STATUS_REG(x) (NITIO_G0_DMA_STATUS + (x)) +#define GI_DMA_READBANK (1 << 13) +#define GI_DRQ_ERROR (1 << 14) +#define GI_DRQ_STATUS (1 << 15) #define NITIO_ABZ_REG(x) (NITIO_G0_ABZ + (x)) #define NITIO_INT_ACK_REG(x) (NITIO_G0_INT_ACK + (x)) #define NITIO_STATUS_REG(x) (NITIO_G0_STATUS + (x)) #define NITIO_INT_ENA_REG(x) (NITIO_G0_INT_ENA + (x)) -enum Gi_DMA_Status_Reg_Bits { - Gi_DMA_Readbank_Bit = 0x2000, - Gi_DRQ_Error_Bit = 0x4000, - Gi_DRQ_Status_Bit = 0x8000 -}; - enum G02_Interrupt_Acknowledge_Bits { G0_Gate_Error_Confirm_Bit = 0x20, G0_TC_Error_Confirm_Bit = 0x40 diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c index d80bb35aed40..f8019bf57ea5 100644 --- a/drivers/staging/comedi/drivers/ni_tiocmd.c +++ b/drivers/staging/comedi/drivers/ni_tiocmd.c @@ -443,7 +443,7 @@ void ni_tio_handle_interrupt(struct ni_gpct *counter, case ni_gpct_variant_m_series: case ni_gpct_variant_660x: if (read_register(counter, NITIO_DMA_STATUS_REG(cidx)) & - Gi_DRQ_Error_Bit) { + GI_DRQ_ERROR) { dev_notice(counter->counter_dev->dev->class_dev, "%s: Gi_DRQ_Error detected.\n", __func__); s->async->events |= COMEDI_CB_OVERFLOW; -- 2.30.2