]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: dmm32at: rename DMM32AT_FIFOSTAT
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 11 Nov 2014 23:55:38 +0000 (16:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 23:33:25 +0000 (15:33 -0800)
For aesthetics, rename this define used for the FIFO Status register.
Define the bits of the register.

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/dmm32at.c

index a58d51d1f53301e9ffda9dd81d47da719d253421..c7f9602ce6e3d52455dfdaaf42283511a2eb286c 100644 (file)
@@ -65,7 +65,14 @@ Configuration Options:
 #define DMM32AT_FIFO_CTRL_FIFOEN       (1 << 3)
 #define DMM32AT_FIFO_CTRL_SCANEN       (1 << 2)
 #define DMM32AT_FIFO_CTRL_FIFORST      (1 << 1)
-#define DMM32AT_FIFOSTAT 0x07
+#define DMM32AT_FIFO_STATUS_REG                0x07
+#define DMM32AT_FIFO_STATUS_EF         (1 << 7)
+#define DMM32AT_FIFO_STATUS_HF         (1 << 6)
+#define DMM32AT_FIFO_STATUS_FF         (1 << 5)
+#define DMM32AT_FIFO_STATUS_OVF                (1 << 4)
+#define DMM32AT_FIFO_STATUS_FIFOEN     (1 << 3)
+#define DMM32AT_FIFO_STATUS_SCANEN     (1 << 2)
+#define DMM32AT_FIFO_STATUS_PAGE_MASK  (3 << 0)
 
 #define DMM32AT_CNTRL 0x08
 #define DMM32AT_AISTAT 0x08
@@ -507,12 +514,13 @@ static int dmm32at_reset(struct comedi_device *dev)
        /* read back the values */
        ailo = inb(dev->iobase + DMM32AT_AI_LO_CHAN_REG);
        aihi = inb(dev->iobase + DMM32AT_AI_HI_CHAN_REG);
-       fifostat = inb(dev->iobase + DMM32AT_FIFOSTAT);
+       fifostat = inb(dev->iobase + DMM32AT_FIFO_STATUS_REG);
        aistat = inb(dev->iobase + DMM32AT_AISTAT);
        intstat = inb(dev->iobase + DMM32AT_INTCLOCK);
        airback = inb(dev->iobase + DMM32AT_AIRBACK);
 
-       if (ailo != 0x00 || aihi != 0x1f || fifostat != 0x80 ||
+       if (ailo != 0x00 || aihi != 0x1f ||
+           fifostat != DMM32AT_FIFO_STATUS_EF ||
            aistat != 0x60 || intstat != 0x00 || airback != 0x0c)
                return -EIO;