]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: ni_stc.h: tidy up Joint_Status_2_Register and bits
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 1 May 2015 21:59:48 +0000 (14:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 May 2015 17:05:15 +0000 (19:05 +0200)
Rename the CamelCase. Use the BIT() macro to define the bits.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_stc.h

index cb4aed174648d0e956d5f75bb540ca71febd924a..17646a2f55b285ef2e63cfb6504eedeb8b45d417 100644 (file)
@@ -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 */
index 509578c46a646efdc42edaec0f046cbf3ee733d6..cd4cf98fbd04dac716fa97d139942c2fbc1f3b33 100644 (file)
 
 #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