From: H Hartley Sweeten Date: Tue, 13 Nov 2012 20:40:50 +0000 (-0700) Subject: staging: comedi: addi_apci_1516: don't reset the apci1016 board X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=722bf0f09f0931aab537400bee29f097ca218ba3;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: addi_apci_1516: don't reset the apci1016 board The apci1016 board only has digital inputs. There is no reason to reset the digital outputs and watchdog timer on that board. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c b/drivers/staging/comedi/drivers/addi_apci_1516.c index c3e167d04303..c1caeb1e525b 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1516.c +++ b/drivers/staging/comedi/drivers/addi_apci_1516.c @@ -63,8 +63,12 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d) static int apci1516_reset(struct comedi_device *dev) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; + if (!this_board->i_Timer) + return 0; + outw(0x0, devpriv->iobase + APCI1516_DO_REG); outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_CTRL_REG); outw(0x0, devpriv->i_IobaseAddon + APCI1516_WDOG_RELOAD_LSB_REG);