From ecaf4c41da4ace751f71fbb3df611a6167425b6e Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 4 Nov 2014 10:55:12 -0700 Subject: [PATCH] staging: comedi: addi_apci_3120: define the AI FIFO register Define the offset for the analog input FIFO register. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 4 +--- drivers/staging/comedi/drivers/addi_apci_3120.c | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 10ab6d89a6d5..703e4f9b1ba8 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -43,8 +43,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY #define APCI3120_START 1 #define APCI3120_STOP 0 -#define APCI3120_RD_FIFO 0x00 - /* software trigger dummy register */ #define APCI3120_START_CONVERSION 0x02 @@ -408,7 +406,7 @@ static irqreturn_t apci3120_interrupt(int irq, void *d) int i; for (i = 0; i < cmd->chanlist_len; i++) { - val = inw(dev->iobase + 0); + val = inw(dev->iobase + APCI3120_AI_FIFO_REG); comedi_buf_write_samples(s, &val, 1); } diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index eec0cdba1206..322640ee91b5 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -16,6 +16,7 @@ /* * PCI BAR 1 register map (dev->iobase) */ +#define APCI3120_AI_FIFO_REG 0x00 #define APCI3120_CTRL_REG 0x00 #define APCI3120_CTRL_EXT_TRIG (1 << 15) #define APCI3120_CTRL_GATE(x) (1 << (12 + (x))) @@ -370,7 +371,7 @@ static int apci3120_ai_insn_read(struct comedi_device *dev, if (ret) return ret; - data[i] = inw(dev->iobase + 0); + data[i] = inw(dev->iobase + APCI3120_AI_FIFO_REG); } return insn->n; -- 2.20.1