staging: comedi: addi_apci_3120: rename APCI3120_TIMER_VALUE
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:53:51 +0000 (10:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:33:58 +0000 (09:33 -0800)
For aesthetics, rename this register offset.

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 6eaf62ab5446f8b815aff0b8d4a4222013dd2502..c9b416ededcc65ef9d3c701ec9917f395c685f48 100644 (file)
@@ -149,7 +149,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
 
 #define APCI3120_TIMER_CRT1            0x0c
 
-#define APCI3120_TIMER_VALUE           0x04
 #define APCI3120_TIMER_STATUS_REGISTER 0x0d
 #define APCI3120_RD_STATUS             0x02
 #define APCI3120_WR_ADDRESS            0x00
@@ -191,14 +190,14 @@ static void apci3120_timer_write(struct comedi_device *dev,
        outb(APCI3120_CTR0_DO_BITS(devpriv->do_bits) |
             APCI3120_CTR0_TIMER_SEL(timer),
             dev->iobase + APCI3120_CTR0_REG);
-       outw(val & 0xffff, dev->iobase + APCI3120_TIMER_VALUE);
+       outw(val & 0xffff, dev->iobase + APCI3120_TIMER_REG);
 
        if (timer == 2) {
                /* write upper 16-bits to timer 2 */
                outb(APCI3120_CTR0_DO_BITS(devpriv->do_bits) |
                     APCI3120_CTR0_TIMER_SEL(timer + 1),
                     dev->iobase + APCI3120_CTR0_REG);
-               outw((val >> 16) & 0xffff, dev->iobase + APCI3120_TIMER_VALUE);
+               outw((val >> 16) & 0xffff, dev->iobase + APCI3120_TIMER_REG);
        }
 }
 
@@ -212,14 +211,14 @@ static unsigned int apci3120_timer_read(struct comedi_device *dev,
        outb(APCI3120_CTR0_DO_BITS(devpriv->do_bits) |
             APCI3120_CTR0_TIMER_SEL(timer),
             dev->iobase + APCI3120_CTR0_REG);
-       val = inw(dev->iobase + APCI3120_TIMER_VALUE);
+       val = inw(dev->iobase + APCI3120_TIMER_REG);
 
        if (timer == 2) {
                /* read upper 16-bits from timer 2 */
                outb(APCI3120_CTR0_DO_BITS(devpriv->do_bits) |
                     APCI3120_CTR0_TIMER_SEL(timer + 1),
                     dev->iobase + APCI3120_CTR0_REG);
-               val |= (inw(dev->iobase + APCI3120_TIMER_VALUE) << 16);
+               val |= (inw(dev->iobase + APCI3120_TIMER_REG) << 16);
        }
 
        return val;
index 51637e1628bc34d081bd9fb50e1a851fccf81996..f431e5492de8e3d790b95801fbd4e0c35a5a8fc5 100644 (file)
@@ -16,6 +16,7 @@
  * PCI BAR 1 register map (dev->iobase)
  */
 #define APCI3120_STATUS_TO_VERSION(x)          (((x) >> 4) & 0xf)
+#define APCI3120_TIMER_REG                     0x04
 #define APCI3120_AO_REG(x)                     (0x08 + (((x) / 4) * 2))
 #define APCI3120_AO_MUX(x)                     (((x) & 0x3) << 14)
 #define APCI3120_AO_DATA(x)                    ((x) << 0)