From: H Hartley Sweeten Date: Tue, 26 Aug 2014 00:55:52 +0000 (-0700) Subject: staging: comedi: s626: use comedi_pci_detach() X-Git-Tag: v3.18-rc1~130^2~990 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8075bfb67566376f706baa7cbc6b5b0e3eb99318;p=karo-tx-linux.git staging: comedi: s626: use comedi_pci_detach() Use comedi_pci_detach() to handle the boilerplate part of the (*detach) for this PCI driver. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 8778bb88d74d..a868d73f86a3 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -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); }