summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2012-11-14 13:10:36 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-14 16:25:47 -0800
commit45d6f1965e9a8b830dd69b98cf8d45de53394ee5 (patch)
treead8517b6992f4d8d959c868557367c0d6d08ca48 /drivers/staging/comedi
parenta692e9743a7b2085afbca2f7e50a449c3e205cc0 (diff)
downloadlinux-3.10-45d6f1965e9a8b830dd69b98cf8d45de53394ee5.tar.gz
linux-3.10-45d6f1965e9a8b830dd69b98cf8d45de53394ee5.tar.bz2
linux-3.10-45d6f1965e9a8b830dd69b98cf8d45de53394ee5.zip
staging: comedi: don't call attach_usb handler
All the Comedi drivers that call `comedi_usb_auto_config()` have replaced the `attach_usb()` handler in their `struct comedi_driver` with a `auto_attach()` handler, so there is no need to check for the existence of the `attach_usb()` 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')
-rw-r--r--drivers/staging/comedi/drivers.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index f780d38d6da..047c1d911c8 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -996,27 +996,11 @@ EXPORT_SYMBOL_GPL(comedi_pci_driver_unregister);
#if IS_ENABLED(CONFIG_USB)
-static int comedi_usb_attach_wrapper(struct comedi_device *dev,
- unsigned long context)
-{
- return dev->driver->attach_usb(dev, (struct usb_interface *)context);
-}
-
-static int comedi_new_usb_auto_config(struct usb_interface *intf,
- struct comedi_driver *driver)
-{
- return comedi_auto_config_helper(&intf->dev, driver,
- comedi_usb_attach_wrapper,
- (unsigned long)intf);
-}
-
int comedi_usb_auto_config(struct usb_interface *intf,
struct comedi_driver *driver)
{
BUG_ON(intf == NULL);
- if (driver->attach_usb)
- return comedi_new_usb_auto_config(intf, driver);
- else if (driver->auto_attach)
+ if (driver->auto_attach)
return comedi_auto_config(&intf->dev, driver, 0);
else
return -EINVAL;