diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2012-11-14 13:10:35 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-15 00:25:47 (GMT) |
commit | a692e9743a7b2085afbca2f7e50a449c3e205cc0 (patch) | |
tree | 1cfa2f962890b0416cadbba8d7115c931d530ac5 /drivers/staging/comedi/drivers.c | |
parent | 847d74a26010e9bae51299b7c1008c5ec9a349f4 (diff) | |
download | linux-fsl-qoriq-a692e9743a7b2085afbca2f7e50a449c3e205cc0.tar.xz |
staging: comedi: don't call attach_pci handler
All the Comedi drivers that call `comedi_pci_auto_config()` have
replaced the `attach_pci()` handler in their `struct comedi_driver` with
a `auto_attach()` handler, so there is no need to check for the
existence of the `attach_pci()` handler any more. Remove this check and
the code that calls it.
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.c')
-rw-r--r-- | drivers/staging/comedi/drivers.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index d8c3cd3..f780d38 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -947,26 +947,10 @@ void comedi_pci_disable(struct pci_dev *pdev) } EXPORT_SYMBOL_GPL(comedi_pci_disable); -static int comedi_pci_attach_wrapper(struct comedi_device *dev, - unsigned long context) -{ - return dev->driver->attach_pci(dev, (struct pci_dev *)context); -} - -static int comedi_new_pci_auto_config(struct pci_dev *pcidev, - struct comedi_driver *driver) -{ - return comedi_auto_config_helper(&pcidev->dev, driver, - comedi_pci_attach_wrapper, - (unsigned long)pcidev); -} - int comedi_pci_auto_config(struct pci_dev *pcidev, struct comedi_driver *driver) { - if (driver->attach_pci) - return comedi_new_pci_auto_config(pcidev, driver); - else if (driver->auto_attach) + if (driver->auto_attach) return comedi_auto_config(&pcidev->dev, driver, 0); else return -EINVAL; |