]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: comedi: addi_apci_3120: rename APCI3120_WR_ADDRESS
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:54:04 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:33:59 +0000 (09:33 -0800)
For aesthetics, rename this define.

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/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi_apci_3120.c

index 3aa4bbedae7f6713662e2583938d501edef22797..184bff4cabd344caa163b2cf8e0627cd847618b8 100644 (file)
@@ -132,7 +132,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
 
 #define APCI3120_TIMER_STATUS_REGISTER 0x0d
 #define APCI3120_RD_STATUS             0x02
-#define APCI3120_WR_ADDRESS            0x00
 #define APCI3120_ENABLE_WATCHDOG       0x20
 #define APCI3120_DISABLE_WATCHDOG      (~APCI3120_ENABLE_WATCHDOG)
 #define APCI3120_ENABLE_TIMER_COUNTER  0x10
@@ -165,7 +164,7 @@ static void apci3120_timer_enable(struct comedi_device *dev,
                devpriv->ctrl |= APCI3120_CTRL_GATE(timer);
        else
                devpriv->ctrl &= ~APCI3120_CTRL_GATE(timer);
-       outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+       outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
 }
 
 static int apci3120_ai_insn_config(struct comedi_device *dev,
@@ -245,7 +244,7 @@ static int apci3120_setup_chan_list(struct comedi_device *dev,
 
        /* set scan length (PR) and scan start (PA) */
        devpriv->ctrl = APCI3120_CTRL_PR(n_chan - 1) | APCI3120_CTRL_PA(0);
-       outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+       outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
 
        for (i = 0; i < n_chan; i++) {
                /*  store range list to card */
@@ -471,7 +470,7 @@ static int apci3120_reset(struct comedi_device *dev)
 
        /* disable all counters, ext trigger, and reset scan */
        devpriv->ctrl = 0;
-       outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+       outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
 
        inw(dev->iobase + 0);   /* make a dummy read */
        inb(dev->iobase + APCI3120_RESET_FIFO); /*  flush FIFO */
@@ -493,7 +492,7 @@ static void apci3120_exttrig_enable(struct comedi_device *dev, bool enable)
                devpriv->ctrl |= APCI3120_CTRL_EXT_TRIG;
        else
                devpriv->ctrl &= ~APCI3120_CTRL_EXT_TRIG;
-       outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+       outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
 }
 
 static int apci3120_cancel(struct comedi_device *dev,
@@ -515,7 +514,7 @@ static int apci3120_cancel(struct comedi_device *dev,
 
        /* disable all counters, ext trigger, and reset scan */
        devpriv->ctrl = 0;
-       outw(devpriv->ctrl, dev->iobase + APCI3120_WR_ADDRESS);
+       outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
 
        /* DISABLE_ALL_INTERRUPT */
        outb(APCI3120_DISABLE_ALL_INTERRUPT,
index 087ff1acf0880502f61fd4c6dcf6dcb0e875805c..014a01495ae2f8823dffecbcf339b2cacbade8d3 100644 (file)
@@ -15,6 +15,7 @@
 /*
  * PCI BAR 1 register map (dev->iobase)
  */
+#define APCI3120_CTRL_REG                      0x00
 #define APCI3120_CTRL_EXT_TRIG                 (1 << 15)
 #define APCI3120_CTRL_GATE(x)                  (1 << (12 + (x)))
 #define APCI3120_CTRL_PR(x)                    (((x) & 0xf) << 8)