staging: comedi: addi_apci_3120: rename APCI3120_RD_STATUS
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:54:37 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:34:01 +0000 (09:34 -0800)
For aesthetics, rename this define used for the status 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 004142efd2e65f6eebe53ed8da286a8733c25e52..5deb1ff921da7e1ee4d7a2bfbebff22b36d71da8 100644 (file)
@@ -81,7 +81,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
 #define APCI3120_EOS_MODE              2
 #define APCI3120_DMA_MODE              3
 
-#define APCI3120_RD_STATUS             0x02
 #define APCI3120_RD_FIFO               0x00
 
 /* status register bits */
@@ -99,7 +98,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
 #define APCI3120_TIMER_DISABLE         0
 #define APCI3120_TIMER_ENABLE          1
 
-#define APCI3120_RD_STATUS             0x02
 #define APCI3120_FC_TIMER              0x1000
 
 #define APCI3120_COUNTER               3
@@ -146,7 +144,7 @@ static int apci3120_ai_eoc(struct comedi_device *dev,
 {
        unsigned int status;
 
-       status = inw(dev->iobase + APCI3120_RD_STATUS);
+       status = inw(dev->iobase + APCI3120_STATUS_REG);
        if ((status & APCI3120_EOC) == 0)
                return 0;
        return -EBUSY;
@@ -220,7 +218,7 @@ static int apci3120_reset(struct comedi_device *dev)
        outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);
 
        apci3120_ai_reset_fifo(dev);
-       inw(dev->iobase + APCI3120_RD_STATUS);  /*  flush A/D status register */
+       inw(dev->iobase + APCI3120_STATUS_REG);
 
        return 0;
 }
@@ -251,7 +249,7 @@ static int apci3120_cancel(struct comedi_device *dev,
        outb(devpriv->mode, dev->iobase + APCI3120_MODE_REG);
 
        apci3120_ai_reset_fifo(dev);
-       inw(dev->iobase + APCI3120_RD_STATUS);
+       inw(dev->iobase + APCI3120_STATUS_REG);
        devpriv->ui_DmaActualBuffer = 0;
 
        devpriv->ai_running = 0;
@@ -753,7 +751,7 @@ static irqreturn_t apci3120_interrupt(int irq, void *d)
        unsigned short int_daq;
        unsigned int int_amcc;
 
-       int_daq = inw(dev->iobase + APCI3120_RD_STATUS) & 0xf000;       /*  get IRQ reasons */
+       int_daq = inw(dev->iobase + APCI3120_STATUS_REG) & 0xf000;
        int_amcc = inl(devpriv->amcc + AMCC_OP_REG_INTCSR);
 
        if ((!int_daq) && (!(int_amcc & ANY_S593X_INT))) {
@@ -1030,8 +1028,7 @@ static int apci3120_read_insn_timer(struct comedi_device *dev,
        if (devpriv->b_Timer2Mode == APCI3120_TIMER) {
                data[0] = apci3120_timer_read(dev, 2);
        } else {                        /*  Read watch dog status */
-
-               us_StatusValue = inw(dev->iobase + APCI3120_RD_STATUS);
+               us_StatusValue = inw(dev->iobase + APCI3120_STATUS_REG);
                us_StatusValue =
                        ((us_StatusValue & APCI3120_FC_TIMER) >> 12) & 1;
                if (us_StatusValue == 1)
@@ -1049,7 +1046,7 @@ static int apci3120_di_insn_bits(struct comedi_device *dev,
        unsigned int val;
 
        /* the input channels are bits 11:8 of the status reg */
-       val = inw(dev->iobase + APCI3120_RD_STATUS);
+       val = inw(dev->iobase + APCI3120_STATUS_REG);
        data[1] = (val >> 8) & 0xf;
 
        return insn->n;
@@ -1080,7 +1077,7 @@ static int apci3120_ao_ready(struct comedi_device *dev,
 {
        unsigned int status;
 
-       status = inw(dev->iobase + APCI3120_RD_STATUS);
+       status = inw(dev->iobase + APCI3120_STATUS_REG);
        if (status & 0x0001)    /* waiting for DA_READY */
                return 0;
        return -EBUSY;
index 9ff6580486e771288e2051053c457e2d29b27b49..d47b2e0f624bad0e6cc35b4a3651d8300e259489 100644 (file)
@@ -20,6 +20,7 @@
 #define APCI3120_CTRL_GATE(x)                  (1 << (12 + (x)))
 #define APCI3120_CTRL_PR(x)                    (((x) & 0xf) << 8)
 #define APCI3120_CTRL_PA(x)                    (((x) & 0xf) << 0)
+#define APCI3120_STATUS_REG                    0x02
 #define APCI3120_STATUS_TO_VERSION(x)          (((x) >> 4) & 0xf)
 #define APCI3120_TIMER_REG                     0x04
 #define APCI3120_CHANLIST_REG                  0x06
@@ -360,7 +361,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
                }
        }
 
-       status = inw(dev->iobase + APCI3120_RD_STATUS);
+       status = inw(dev->iobase + APCI3120_STATUS_REG);
        if (APCI3120_STATUS_TO_VERSION(status) == APCI3120_REVB ||
            context == BOARD_APCI3001)
                devpriv->osc_base = APCI3120_REVB_OSC_BASE;
This page took 0.028562 seconds and 5 git commands to generate.