From: H Hartley Sweeten <hsweeten@visionengravers.com>
Date: Mon, 10 Nov 2014 23:20:08 +0000 (-0700)
Subject: staging: comedi: addi_apci_1564: use correct I/O base for APCI1564_DI_INT_STATUS_REG
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=950a6f8714fd73d4348036413f21e056de4b10bd;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

staging: comedi: addi_apci_1564: use correct I/O base for APCI1564_DI_INT_STATUS_REG

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>
---

diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index cf14b0a923d4..467e27838b56 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -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);