From: H Hartley Sweeten Date: Tue, 4 Nov 2014 17:54:04 +0000 (-0700) Subject: staging: comedi: addi_apci_3120: rename APCI3120_WR_ADDRESS X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=9625742666306f866c9b56c41c25f8d35721dd29;p=deliverable%2Flinux.git staging: comedi: addi_apci_3120: rename APCI3120_WR_ADDRESS For aesthetics, rename this define. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 3aa4bbedae7f..184bff4cabd3 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index 087ff1acf088..014a01495ae2 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -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)