From 92cba8f3b42e1cb8211b64e91618102ecc8f0a6d Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 6 Nov 2012 11:16:42 -0700 Subject: [PATCH] staging: comedi: addi-data: use auto_attach instead of attach_pci 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/addi_common.c | 5 +++-- drivers/staging/comedi/drivers/addi_apci_035.c | 2 +- drivers/staging/comedi/drivers/addi_apci_1500.c | 2 +- drivers/staging/comedi/drivers/addi_apci_1516.c | 2 +- drivers/staging/comedi/drivers/addi_apci_1564.c | 2 +- drivers/staging/comedi/drivers/addi_apci_16xx.c | 2 +- drivers/staging/comedi/drivers/addi_apci_2016.c | 2 +- drivers/staging/comedi/drivers/addi_apci_2032.c | 2 +- drivers/staging/comedi/drivers/addi_apci_2200.c | 2 +- drivers/staging/comedi/drivers/addi_apci_3200.c | 2 +- drivers/staging/comedi/drivers/addi_apci_3501.c | 2 +- drivers/staging/comedi/drivers/addi_apci_3xxx.c | 2 +- 12 files changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index d2d57e5862e6..2500d53a6a35 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -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; diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c b/drivers/staging/comedi/drivers/addi_apci_035.c index 43b83cf48107..3055fc2e0a7d 100644 --- a/drivers/staging/comedi/drivers/addi_apci_035.c +++ b/drivers/staging/comedi/drivers/addi_apci_035.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index 8d390a4fba81..8528b27f77e7 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c b/drivers/staging/comedi/drivers/addi_apci_1516.c index e5b8c11cb7b4..0382844fdc0d 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1516.c +++ b/drivers/staging/comedi/drivers/addi_apci_1516.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index 2fd335b2aad5..926fa088392f 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_16xx.c b/drivers/staging/comedi/drivers/addi_apci_16xx.c index 14283aad0e42..170d576761a0 100644 --- a/drivers/staging/comedi/drivers/addi_apci_16xx.c +++ b/drivers/staging/comedi/drivers/addi_apci_16xx.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_2016.c b/drivers/staging/comedi/drivers/addi_apci_2016.c index e9431f8cebad..54b05d3fa1bd 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2016.c +++ b/drivers/staging/comedi/drivers/addi_apci_2016.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c index 9766c240d809..7758de3146e9 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2032.c +++ b/drivers/staging/comedi/drivers/addi_apci_2032.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_2200.c b/drivers/staging/comedi/drivers/addi_apci_2200.c index 69503b478455..3041009915f0 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2200.c +++ b/drivers/staging/comedi/drivers/addi_apci_2200.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_3200.c b/drivers/staging/comedi/drivers/addi_apci_3200.c index ee527a71701d..e95141dabbd9 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3200.c +++ b/drivers/staging/comedi/drivers/addi_apci_3200.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index b7899488df08..4c60167be2fc 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -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, diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index ae2967a027ed..cc3938124cdc 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -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, -- 2.39.5