]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: addi_apci_*: use auto_attach instead of attach_pci
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 6 Nov 2012 18:16:59 +0000 (11:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:46:41 +0000 (11:46 -0800)
Change the remaining addi-data drivers so they attach using the generic
'auto_attach' method instead the pci specific 'attach_pci' method. The
'attach_pci' is deprecated and is going to be removed.

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

index 2f23a1730641a12e697d92ec3b5b302e9975206d..14b5989e41a1399015be2920c20973a35fdb2c09 100644 (file)
@@ -246,9 +246,10 @@ static int apci1032_di_insn_bits(struct comedi_device *dev,
        return insn->n;
 }
 
-static int apci1032_attach_pci(struct comedi_device *dev,
-                              struct pci_dev *pcidev)
+static int __devinit apci1032_auto_attach(struct comedi_device *dev,
+                                         unsigned long context_unused)
 {
+       struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct apci1032_private *devpriv;
        struct comedi_subdevice *s;
        int ret;
@@ -325,7 +326,7 @@ static void apci1032_detach(struct comedi_device *dev)
 static struct comedi_driver apci1032_driver = {
        .driver_name    = "addi_apci_1032",
        .module         = THIS_MODULE,
-       .attach_pci     = apci1032_attach_pci,
+       .auto_attach    = apci1032_auto_attach,
        .detach         = apci1032_detach,
 };
 
index 66dd94c26900518dc8993f6e359688b2976d8d6b..485f8214516f97bb5a13cabca865b988353c0612 100644 (file)
@@ -52,9 +52,10 @@ static const void *apci1710_find_boardinfo(struct comedi_device *dev,
        return NULL;
 }
 
-static int apci1710_attach_pci(struct comedi_device *dev,
-                              struct pci_dev *pcidev)
+static int __devinit apci1710_auto_attach(struct comedi_device *dev,
+                                         unsigned long context_unused)
 {
+       struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        const struct addi_board *this_board;
        struct addi_private *devpriv;
        struct comedi_subdevice *s;
@@ -117,7 +118,7 @@ static void apci1710_detach(struct comedi_device *dev)
 static struct comedi_driver apci1710_driver = {
        .driver_name    = "addi_apci_1710",
        .module         = THIS_MODULE,
-       .attach_pci     = apci1710_attach_pci,
+       .auto_attach    = apci1710_auto_attach,
        .detach         = apci1710_detach,
 };
 
index f65f8271807d61c831b21bea9e3b32dbaa967eb0..34aab504d350a521d838f1d017cafb0384c6ee9c 100644 (file)
@@ -60,9 +60,10 @@ static const void *apci3120_find_boardinfo(struct comedi_device *dev,
        return NULL;
 }
 
-static int apci3120_attach_pci(struct comedi_device *dev,
-                              struct pci_dev *pcidev)
+static int __devinit apci3120_auto_attach(struct comedi_device *dev,
+                                         unsigned long context_unused)
 {
+       struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        const struct addi_board *this_board;
        struct addi_private *devpriv;
        struct comedi_subdevice *s;
@@ -240,7 +241,7 @@ static void apci3120_detach(struct comedi_device *dev)
 static struct comedi_driver apci3120_driver = {
        .driver_name    = "addi_apci_3120",
        .module         = THIS_MODULE,
-       .attach_pci     = apci3120_attach_pci,
+       .auto_attach    = apci3120_auto_attach,
        .detach         = apci3120_detach,
 };