Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8075bfb6 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3757e795
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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);
}