staging: comedi: ni_stc.h: tidy up NI_M_AO_REF_ATTENUATION_REG bits
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 1 May 2015 21:58:41 +0000 (14:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 May 2015 17:05:05 +0000 (19:05 +0200)
Rename the CamelCase and convert the enum 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 7f4e9d6df8fe898b806c07c407ad64118c1e81d3..c100c0875e758820bea496e99031a26a2826b12c 100644 (file)
@@ -2675,12 +2675,12 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device *dev,
                        break;
                case 4000000:
                        conf |= NI_M_AO_CFG_BANK_REF_INT_10V;
-                       ni_writeb(dev, MSeries_Attenuate_x5_Bit,
+                       ni_writeb(dev, NI_M_AO_REF_ATTENUATION_X5,
                                  NI_M_AO_REF_ATTENUATION_REG(chan));
                        break;
                case 2000000:
                        conf |= NI_M_AO_CFG_BANK_REF_INT_5V;
-                       ni_writeb(dev, MSeries_Attenuate_x5_Bit,
+                       ni_writeb(dev, NI_M_AO_REF_ATTENUATION_X5,
                                  NI_M_AO_REF_ATTENUATION_REG(chan));
                        break;
                default:
index bde58031dba334ae572cf41f197eeaddde182352..1ad7981914bbf3eee776aa549f3631b83c4e2cd2 100644 (file)
@@ -1037,10 +1037,7 @@ static const struct comedi_lrange range_ni_E_ao_ext;
 #define NI_M_CDO_MASK_ENA_REG          0x234
 #define NI_M_STATIC_AI_CTRL_REG(x)     ((x) ? (0x260 + (x)) : 0x064)
 #define NI_M_AO_REF_ATTENUATION_REG(x) (0x264 + (x))
-
-enum MSeries_AO_Reference_Attenuation_Bits {
-       MSeries_Attenuate_x5_Bit = 0x1
-};
+#define NI_M_AO_REF_ATTENUATION_X5     BIT(0)
 
 static inline unsigned MSeries_Cal_PWM_High_Time_Bits(unsigned count)
 {
This page took 0.029194 seconds and 5 git commands to generate.