aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/adl_pci7x3x.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2012-10-30 13:30:04 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-30 10:53:50 -0700
commit750af5e568d060ec6994cdcb4e86cdddfcd473c0 (patch)
treeccd15b343093357003759fbe7787bcb4e1cc0281 /drivers/staging/comedi/drivers/adl_pci7x3x.c
parentstaging: comedi/drivers: use auto_attach instead of attach_usb (diff)
downloadlinux-dev-750af5e568d060ec6994cdcb4e86cdddfcd473c0.tar.xz
linux-dev-750af5e568d060ec6994cdcb4e86cdddfcd473c0.zip
staging: comedi/drivers: use auto_attach instead of attach_pci
Change comedi drivers for PCI boards to use the new `auto_attach()` method instead of the `attach_pci()` method. I plan to remove the `attach_pci()` and `attach_usb()` methods from `struct comedi_driver` once nothing is using them. Tag the functions with `__devinit` where they are not already so tagged, as they are only called during PCI probe. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/adl_pci7x3x.c')
-rw-r--r--drivers/staging/comedi/drivers/adl_pci7x3x.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/adl_pci7x3x.c b/drivers/staging/comedi/drivers/adl_pci7x3x.c
index 8eee2fa0bf00..be01b2021979 100644
--- a/drivers/staging/comedi/drivers/adl_pci7x3x.c
+++ b/drivers/staging/comedi/drivers/adl_pci7x3x.c
@@ -168,9 +168,10 @@ static const void *adl_pci7x3x_find_boardinfo(struct comedi_device *dev,
return NULL;
}
-static int adl_pci7x3x_attach_pci(struct comedi_device *dev,
- struct pci_dev *pcidev)
+static int __devinit adl_pci7x3x_auto_attach(struct comedi_device *dev,
+ unsigned long context_unused)
{
+ struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct adl_pci7x3x_boardinfo *board;
struct comedi_subdevice *s;
int subdev;
@@ -291,7 +292,7 @@ static void adl_pci7x3x_detach(struct comedi_device *dev)
static struct comedi_driver adl_pci7x3x_driver = {
.driver_name = "adl_pci7x3x",
.module = THIS_MODULE,
- .attach_pci = adl_pci7x3x_attach_pci,
+ .auto_attach = adl_pci7x3x_auto_attach,
.detach = adl_pci7x3x_detach,
};