staging: comedi: amplc_pci230: set detach handler to comedi_pci_detach()
authorIan Abbott <abbotti@mev.co.uk>
Mon, 1 Sep 2014 11:03:39 +0000 (12:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Sep 2014 18:21:31 +0000 (11:21 -0700)
Since the comedi driver's "detach`" handler `pci230_detach()` now merely
calls `comedi_pci_detach()` with the same parameter, use
`comedi_pci_detach()` itself as the "detach" handler.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/amplc_pci230.c

index 39fa2f63f14a4b269c45bd90f9f9e081559d9c37..35d7f0c9836f397cbc3f4fc8194736112b5c5116 100644 (file)
@@ -2732,16 +2732,11 @@ static int pci230_auto_attach(struct comedi_device *dev,
        return pci230_attach_common(dev, pci_dev);
 }
 
-static void pci230_detach(struct comedi_device *dev)
-{
-       comedi_pci_detach(dev);
-}
-
 static struct comedi_driver amplc_pci230_driver = {
        .driver_name    = "amplc_pci230",
        .module         = THIS_MODULE,
        .auto_attach    = pci230_auto_attach,
-       .detach         = pci230_detach,
+       .detach         = comedi_pci_detach,
 };
 
 static int amplc_pci230_pci_probe(struct pci_dev *dev,