staging: comedi: daqboard2000: rename reference DACs register macros
authorIan Abbott <abbotti@mev.co.uk>
Thu, 19 May 2016 18:15:25 +0000 (19:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Jun 2016 03:57:54 +0000 (20:57 -0700)
Rename the macros that define values for the reference DACs register to
avoid CamelCase, and to make it clearer which register they are
associated with.  Add a macro `DB2K_REG_DACS_SET` for the value `0x0080`
that triggers setting one of the references.

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

index 6f991e79ba76ba73cf687e1392c0abd5dd797c90..28767109218980944ed4a9406afc1ed537f74b07 100644 (file)
@@ -244,8 +244,9 @@ static const struct comedi_lrange range_daqboard2000_ai = {
 #define DB2K_TRIG_CONTROL_DISABLE                      0x0000
 
 /* Reference Dac Selection */
-#define DAQBOARD2000_PosRefDacSelect             0x0100
-#define DAQBOARD2000_NegRefDacSelect             0x0000
+#define DB2K_REF_DACS_SET                              0x0080
+#define DB2K_REF_DACS_SELECT_POS_REF                   0x0100
+#define DB2K_REF_DACS_SELECT_NEG_REF                   0x0000
 
 struct daq200_boardtype {
        const char *name;
@@ -569,7 +570,7 @@ static void daqboard2000_activateReferenceDacs(struct comedi_device *dev)
        int timeout;
 
        /*  Set the + reference dac value in the FPGA */
-       writew(0x80 | DAQBOARD2000_PosRefDacSelect,
+       writew(DB2K_REF_DACS_SET | DB2K_REF_DACS_SELECT_POS_REF,
               dev->mmio + DB2K_REG_REF_DACS);
        for (timeout = 0; timeout < 20; timeout++) {
                val = readw(dev->mmio + DB2K_REG_DAC_STATUS);
@@ -579,7 +580,7 @@ static void daqboard2000_activateReferenceDacs(struct comedi_device *dev)
        }
 
        /*  Set the - reference dac value in the FPGA */
-       writew(0x80 | DAQBOARD2000_NegRefDacSelect,
+       writew(DB2K_REF_DACS_SET | DB2K_REF_DACS_SELECT_NEG_REF,
               dev->mmio + DB2K_REG_REF_DACS);
        for (timeout = 0; timeout < 20; timeout++) {
                val = readw(dev->mmio + DB2K_REG_DAC_STATUS);