]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: addi-data: use auto_attach instead of attach_pci
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 6 Nov 2012 18:16:42 +0000 (11:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 19:46:41 +0000 (11:46 -0800)
Change the addi-data drivers that use the "common" code 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>
12 files changed:
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi_apci_035.c
drivers/staging/comedi/drivers/addi_apci_1500.c
drivers/staging/comedi/drivers/addi_apci_1516.c
drivers/staging/comedi/drivers/addi_apci_1564.c
drivers/staging/comedi/drivers/addi_apci_16xx.c
drivers/staging/comedi/drivers/addi_apci_2016.c
drivers/staging/comedi/drivers/addi_apci_2032.c
drivers/staging/comedi/drivers/addi_apci_2200.c
drivers/staging/comedi/drivers/addi_apci_3200.c
drivers/staging/comedi/drivers/addi_apci_3501.c
drivers/staging/comedi/drivers/addi_apci_3xxx.c

index d2d57e5862e6218088d06dbe3217eefd56039099..2500d53a6a357f9ff68234b40916ac264e9246ef 100644 (file)
@@ -93,9 +93,10 @@ static const void *addi_find_boardinfo(struct comedi_device *dev,
        return NULL;
 }
 
-static int addi_attach_pci(struct comedi_device *dev,
-                          struct pci_dev *pcidev)
+static int __devinit addi_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;
index 43b83cf48107116690f7e99bc5d19fb72da7db46..3055fc2e0a7daedeac7636cf54a51b050a2c4eb1 100644 (file)
@@ -40,7 +40,7 @@ static const struct addi_board apci035_boardtypes[] = {
 static struct comedi_driver apci035_driver = {
        .driver_name    = "addi_apci_035",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci035_boardtypes),
        .board_name     = &apci035_boardtypes[0].pc_DriverName,
index 8d390a4fba815b1a3ddc38ff1a5d3858b6c50619..8528b27f77e75b853dd9a37a332be13c6b3a35a6 100644 (file)
@@ -40,7 +40,7 @@ static const struct addi_board apci1500_boardtypes[] = {
 static struct comedi_driver apci1500_driver = {
        .driver_name    = "addi_apci_1500",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci1500_boardtypes),
        .board_name     = &apci1500_boardtypes[0].pc_DriverName,
index e5b8c11cb7b413f0520e476df0dc2ececa6b3e7b..0382844fdc0d09f8e34e601107b46219a48b728c 100644 (file)
@@ -33,7 +33,7 @@ static const struct addi_board apci1516_boardtypes[] = {
 static struct comedi_driver apci1516_driver = {
        .driver_name    = "addi_apci_1516",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci1516_boardtypes),
        .board_name     = &apci1516_boardtypes[0].pc_DriverName,
index 2fd335b2aad5a255e2f1a9c5e58973be908a9d04..926fa088392f66e3150189bb9e4b7fd75f132e32 100644 (file)
@@ -37,7 +37,7 @@ static const struct addi_board apci1564_boardtypes[] = {
 static struct comedi_driver apci1564_driver = {
        .driver_name    = "addi_apci_1564",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci1564_boardtypes),
        .board_name     = &apci1564_boardtypes[0].pc_DriverName,
index 14283aad0e420bfef405b94e5dd2dbc4e82fc3e4..170d576761a01ed5e9a97601be7fa6d9d1138216 100644 (file)
@@ -39,7 +39,7 @@ static const struct addi_board apci16xx_boardtypes[] = {
 static struct comedi_driver apci16xx_driver = {
        .driver_name    = "addi_apci_16xx",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci16xx_boardtypes),
        .board_name     = &apci16xx_boardtypes[0].pc_DriverName,
index e9431f8cebad96d5e04b4293fbcdc3b73c5cf507..54b05d3fa1bd149279d6ff1896614fcbd4d36582 100644 (file)
@@ -31,7 +31,7 @@ static const struct addi_board apci2016_boardtypes[] = {
 static struct comedi_driver apci2016_driver = {
        .driver_name    = "addi_apci_2016",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci2016_boardtypes),
        .board_name     = &apci2016_boardtypes[0].pc_DriverName,
index 9766c240d809711cdaa88f5ea473aec39ab166fb..7758de3146e9e9985e2166a0ae3554a9d9c1607d 100644 (file)
@@ -34,7 +34,7 @@ static const struct addi_board apci2032_boardtypes[] = {
 static struct comedi_driver apci2032_driver = {
        .driver_name    = "addi_apci_2032",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci2032_boardtypes),
        .board_name     = &apci2032_boardtypes[0].pc_DriverName,
index 69503b478455cb83206cf97f88ce9c821d975545..3041009915f0568b8ff050ac7962f0b480f5e057 100644 (file)
@@ -32,7 +32,7 @@ static const struct addi_board apci2200_boardtypes[] = {
 static struct comedi_driver apci2200_driver = {
        .driver_name    = "addi_apci_2200",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci2200_boardtypes),
        .board_name     = &apci2200_boardtypes[0].pc_DriverName,
index ee527a71701d99be86a2e2afee401edec2752ca0..e95141dabbd9416323ba512b91a53548ef2f1b88 100644 (file)
@@ -93,7 +93,7 @@ MODULE_DEVICE_TABLE(pci, apci3200_pci_table);
 static struct comedi_driver apci3200_driver = {
        .driver_name    = "addi_apci_3200",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci3200_boardtypes),
        .board_name     = &apci3200_boardtypes[0].pc_DriverName,
index b7899488df080435ffb90c0aff74e718773ff241..4c60167be2fcae6dd4004406515f748137763b79 100644 (file)
@@ -44,7 +44,7 @@ MODULE_DEVICE_TABLE(pci, apci3501_pci_table);
 static struct comedi_driver apci3501_driver = {
        .driver_name    = "addi_apci_3501",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci3501_boardtypes),
        .board_name     = &apci3501_boardtypes[0].pc_DriverName,
index ae2967a027ed768e57ed12be7ce2c6cb45180a93..cc3938124cdc810ea5bd2a06dfdb842d2593ec39 100644 (file)
@@ -738,7 +738,7 @@ static const struct addi_board apci3xxx_boardtypes[] = {
 static struct comedi_driver apci3xxx_driver = {
        .driver_name    = "addi_apci_3xxx",
        .module         = THIS_MODULE,
-       .attach_pci     = addi_attach_pci,
+       .auto_attach    = addi_auto_attach,
        .detach         = i_ADDI_Detach,
        .num_names      = ARRAY_SIZE(apci3xxx_boardtypes),
        .board_name     = &apci3xxx_boardtypes[0].pc_DriverName,