]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: s626: use comedi_pci_detach()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 26 Aug 2014 00:55:52 +0000 (17:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:26:29 +0000 (13:26 -0700)
Use comedi_pci_detach() to handle the boilerplate part of the (*detach)
for this PCI driver.

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/s626.c

index 8778bb88d74dff3b29aa01ea5aa277cd9f3e6c9b..a868d73f86a3311f8ba9d417585f61f2507a0c8f 100644 (file)
@@ -2914,13 +2914,8 @@ static void s626_detach(struct comedi_device *dev)
                        writel(S626_MC1_SHUTDOWN, dev->mmio + S626_P_MC1);
                        writel(S626_ACON1_BASE, dev->mmio + S626_P_ACON1);
                }
-
-               if (dev->irq)
-                       free_irq(dev->irq, dev);
-               if (dev->mmio)
-                       iounmap(dev->mmio);
        }
-       comedi_pci_disable(dev);
+       comedi_pci_detach(dev);
        s626_free_dma_buffers(dev);
 }