diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2012-11-14 13:10:37 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-15 00:25:47 (GMT) |
commit | af448aca8fa41789aec8a968a56ed0868c803a2b (patch) | |
tree | ea98f659a75cde7affa5be5e99ceb33f8525ee92 /drivers/staging/comedi/drivers.c | |
parent | 45d6f1965e9a8b830dd69b98cf8d45de53394ee5 (diff) | |
download | linux-fsl-qoriq-af448aca8fa41789aec8a968a56ed0868c803a2b.tar.xz |
staging: comedi: don't check driver->auto_attach
There is no need for `comedi_pci_auto_config()` and
`comedi_usb_auto_config()` to check that `driver->auto_attach` is
non-null before calling `comedi_auto_attach()` as this check is done by
`comedi_auto_config()` itself (actually by
`comedi_auto_config_wrapper()`). Remove the unnecessary checks.
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 | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 047c1d9..d27425e 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -949,11 +949,7 @@ EXPORT_SYMBOL_GPL(comedi_pci_disable); int comedi_pci_auto_config(struct pci_dev *pcidev, struct comedi_driver *driver) { - - if (driver->auto_attach) - return comedi_auto_config(&pcidev->dev, driver, 0); - else - return -EINVAL; + return comedi_auto_config(&pcidev->dev, driver, 0); } EXPORT_SYMBOL_GPL(comedi_pci_auto_config); @@ -1000,10 +996,7 @@ int comedi_usb_auto_config(struct usb_interface *intf, struct comedi_driver *driver) { BUG_ON(intf == NULL); - if (driver->auto_attach) - return comedi_auto_config(&intf->dev, driver, 0); - else - return -EINVAL; + return comedi_auto_config(&intf->dev, driver, 0); } EXPORT_SYMBOL_GPL(comedi_usb_auto_config); |