From: H Hartley Sweeten Date: Wed, 5 Aug 2015 17:45:16 +0000 (-0700) Subject: staging: comedi: me4000: fix me4000_detach() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=607d993942512f6b005b0465be85f21db7725ecc;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: me4000: fix me4000_detach() There is no real reason to reset the board when detaching. The comedi core will ensure that any commands are canceled before the detach. But the PLX interrupts should be disabled. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index a4c28fa90759..4f2ff860cf63 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -1276,8 +1276,12 @@ static int me4000_auto_attach(struct comedi_device *dev, static void me4000_detach(struct comedi_device *dev) { - if (dev->iobase) - me4000_reset(dev); + if (dev->irq) { + struct me4000_private *devpriv = dev->private; + + /* Disable interrupts on the PLX */ + outl(0, devpriv->plx_regbase + PLX9052_INTCSR); + } comedi_pci_detach(dev); }