staging: comedi: amplc_pci230: use auto_attach() hook
authorIan Abbott <abbotti@mev.co.uk>
Sat, 27 Oct 2012 20:44:18 +0000 (21:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Oct 2012 22:02:09 +0000 (15:02 -0700)
Use the new `auto_attach()` hook in the `struct comedi_driver` instead
of the old `attach_pci()` hook.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/amplc_pci230.c

index d66d7d7..db67c83 100644 (file)
@@ -2843,9 +2843,10 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        return pci230_attach_common(dev, pci_dev);
 }
 
-static int __devinit pci230_attach_pci(struct comedi_device *dev,
-                                      struct pci_dev *pci_dev)
+static int __devinit pci230_auto_attach(struct comedi_device *dev,
+                                       unsigned long context_unused)
 {
+       struct pci_dev *pci_dev = comedi_to_pci_dev(dev);
        int rc;
 
        dev_info(dev->class_dev, "amplc_pci230: attach pci %s\n",
@@ -2891,7 +2892,7 @@ static struct comedi_driver amplc_pci230_driver = {
        .driver_name    = "amplc_pci230",
        .module         = THIS_MODULE,
        .attach         = pci230_attach,
-       .attach_pci     = pci230_attach_pci,
+       .auto_attach    = pci230_auto_attach,
        .detach         = pci230_detach,
        .board_name     = &pci230_boards[0].name,
        .offset         = sizeof(pci230_boards[0]),