]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: comedi: addi_apci_1564: fix use of apci1564_reset() to disable DI interrupts
authorChase Southwood <chase.southwood@gmail.com>
Thu, 3 Jul 2014 02:17:04 +0000 (21:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 23:24:47 +0000 (16:24 -0700)
apci1564_cos_insn_config() is currently using apci1564_reset() to disable
digital input interrupts when the configuration operation is
COMEDI_DIGITAL_TRIG_DISABLE.  However, this is incorrect as the device reset
function also resets the registers for the digital outputs, timer, watchdog, and
counters as well.  Replace the reset function call with a direct disabling of
just the digital input interrupts.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Cc: 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 59786e7c9582e47f273e001b082095a5fbe10e43..0141ed9592da8266ca5b7fe070fcefe33952c927 100644 (file)
@@ -285,7 +285,10 @@ static int apci1564_cos_insn_config(struct comedi_device *dev,
                        devpriv->ctrl = 0;
                        devpriv->mode1 = 0;
                        devpriv->mode2 = 0;
-                       apci1564_reset(dev);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
+                       inl(devpriv->amcc_iobase + APCI1564_DI_INT_STATUS_REG);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_INT_MODE1_REG);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_INT_MODE2_REG);
                        break;
                case COMEDI_DIGITAL_TRIG_ENABLE_EDGES:
                        if (devpriv->ctrl != (APCI1564_DI_INT_ENABLE |