staging: comedi: addi_apci_1564: use correct I/O base for APCI1564_DI_INT_STATUS_REG
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 10 Nov 2014 23:20:08 +0000 (16:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 23:31:32 +0000 (15:31 -0800)
The APCI1564_DI_INT_STATUS_REG is located in the PCI BAR 0 I/O space. That
base address is stored in devpriv->amcc_iobase. Use that to correctly read
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/addi_apci_1564.c

index cf14b0a923d408d48c9312fa81f7b96e0e6c490c..467e27838b56251f1032a89bceab326f9ec859b5 100644 (file)
@@ -85,8 +85,8 @@ static irqreturn_t apci1564_interrupt(int irq, void *d)
                outl(status & APCI1564_DI_INT_DISABLE,
                     devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
 
-               s->state = inl(dev->iobase + APCI1564_DI_INT_STATUS_REG)
-                              & 0xffff;
+               s->state = inl(devpriv->amcc_iobase +
+                              APCI1564_DI_INT_STATUS_REG) & 0xffff;
                comedi_buf_write_samples(s, &s->state, 1);
                comedi_handle_events(dev, s);