Rename the CamelCase. Use the BIT() macro to define the bits. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/ni_mio_common.c | 8 ++++---- drivers/staging/comedi/drivers/ni_stc.h | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index cb4aed1..17646a2 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -425,7 +425,7 @@ static const struct mio_regmap m_series_stc_read_regmap[] = { [NISTC_AO_UC_SAVE_REG] = { 0x128, 4 }, [NISTC_STATUS1_REG] = { 0x136, 2 }, [NISTC_DIO_SERIAL_IN_REG] = { 0x009, 1 }, - [Joint_Status_2_Register] = { 0x13a, 2 }, + [NISTC_STATUS2_REG] = { 0x13a, 2 }, [AI_SI_Save_Registers] = { 0x180, 4 }, [AI_SC_Save_Registers] = { 0x184, 4 }, }; @@ -2849,8 +2849,8 @@ static int ni_ao_inttrig(struct comedi_device *dev, /* wait for DACs to be loaded */ for (i = 0; i < timeout; i++) { udelay(1); - if ((ni_stc_readw(dev, Joint_Status_2_Register) & - AO_TMRDACWRs_In_Progress_St) == 0) + if ((ni_stc_readw(dev, NISTC_STATUS2_REG) & + NISTC_STATUS2_AO_TMRDACWRS_IN_PROGRESS) == 0) break; } if (i == timeout) { @@ -3727,7 +3727,7 @@ static const struct mio_regmap ni_gpct_to_stc_regmap[] = { [NITIO_G01_STATUS] = { NISTC_G01_STATUS_REG, 2 }, [NITIO_G01_RESET] = { NISTC_RESET_REG, 2 }, [NITIO_G01_STATUS1] = { NISTC_STATUS1_REG, 2 }, - [NITIO_G01_STATUS2] = { Joint_Status_2_Register, 2 }, + [NITIO_G01_STATUS2] = { NISTC_STATUS2_REG, 2 }, [NITIO_G0_DMA_CFG] = { 0x1b8, 2 }, /* M-Series only */ [NITIO_G1_DMA_CFG] = { 0x1ba, 2 }, /* M-Series only */ [NITIO_G0_DMA_STATUS] = { 0x1b8, 2 }, /* M-Series only */ diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index 509578c..cd4cf98 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -555,14 +555,12 @@ #define NISTC_DIO_SERIAL_IN_REG 28 +#define NISTC_STATUS2_REG 29 +#define NISTC_STATUS2_AO_TMRDACWRS_IN_PROGRESS BIT(5) + #define AI_SI_Save_Registers 64 #define AI_SC_Save_Registers 66 -#define Joint_Status_2_Register 29 -enum Joint_Status_2_Bits { - AO_TMRDACWRs_In_Progress_St = 0x20, -}; - /* command register */ #define G_Disarm_Copy _bit15 /* strobe */ #define G_Save_Trace_Copy _bit14 -- 2.3.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel