]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: ni_stc.h: tidy up NI_M_INTC_ENA_REG bits
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 1 May 2015 21:58:51 +0000 (14:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 May 2015 17:05:07 +0000 (19:05 +0200)
Rename the CamelCase and convert enums into defines. 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 e8c6fff81c40f9f2cb8647f28ae753ce8552c31d..1ecbb3cf7feae860c8cf77c1405b92e3dd00d083 100644 (file)
@@ -3433,7 +3433,7 @@ static int ni_cdo_inttrig(struct comedi_device *dev,
        /*
         * XXX not sure what interrupt C group does
         * wait for dma to fill output fifo
-        * ni_writeb(dev, Interrupt_Group_C_Enable_Bit, NI_M_INTC_ENA_REG);
+        * ni_writeb(dev, NI_M_INTC_ENA, NI_M_INTC_ENA_REG);
         */
        for (i = 0; i < timeout; ++i) {
                if (ni_readl(dev, NI_M_CDIO_STATUS_REG) &
index a05c6ef66ff8ac24ce19b66b2efdbfd7175a25c6..a29e65af62611accf3421b4ba0dbfaffcdc363c6 100644 (file)
@@ -959,6 +959,7 @@ static const struct comedi_lrange range_ni_E_ao_ext;
 #define NI_M_AI_CFG_BANK_SEL(x)                ((((x) & 0x40) << 4) | ((x) & 0x30))
 #define NI_M_AI_CFG_CHAN_SEL(x)                (((x) & 0xf) << 0)
 #define NI_M_INTC_ENA_REG              0x088
+#define NI_M_INTC_ENA                  BIT(0)
 #define NI_M_INTC_STATUS_REG           0x088
 #define NI_M_ATRIG_CTRL_REG            0x08c
 #define NI_M_AO_SER_INT_ENA_REG                0x0a0
@@ -1112,10 +1113,6 @@ static const struct comedi_lrange range_ni_E_ao_ext;
 #define NI_M_AO_REF_ATTENUATION_REG(x) (0x264 + (x))
 #define NI_M_AO_REF_ATTENUATION_X5     BIT(0)
 
-enum Interrupt_C_Enable_Bits {
-       Interrupt_Group_C_Enable_Bit = 0x1
-};
-
 enum Interrupt_C_Status_Bits {
        Interrupt_Group_C_Status_Bit = 0x1
 };