diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-02-06 00:23:40 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-06 02:07:11 (GMT) |
commit | 55ab4f641a3bfbdb7c59b80e194c7242234bbb1f (patch) | |
tree | 62ec947f7c747e8f4ea99290e434a4037015cdef /drivers/staging/comedi/comedi_usb.c | |
parent | 29d6dd3310641f7dc0dbd9b55f651eb9846f2aa6 (diff) | |
download | linux-55ab4f641a3bfbdb7c59b80e194c7242234bbb1f.tar.xz |
staging: comedi: comedi_usb: allow comedi usb drivers to pass a 'context'
Allow the comedi usb drivers to pass a 'context' from their (*probe)
functions to the comedi core's comedi_usb_auto_config(). This 'context'
is then passed to comedi_auto_config() and then to the comedi_driver's
(*auto_attach).
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_usb.c')
-rw-r--r-- | drivers/staging/comedi/comedi_usb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/comedi/comedi_usb.c b/drivers/staging/comedi/comedi_usb.c index cd6abba..9d9716a 100644 --- a/drivers/staging/comedi/comedi_usb.c +++ b/drivers/staging/comedi/comedi_usb.c @@ -38,13 +38,15 @@ EXPORT_SYMBOL_GPL(comedi_to_usb_interface); * comedi_usb_auto_config() - Configure/probe a comedi USB driver. * @intf: usb_interface struct * @driver: comedi_driver struct + * @context: driver specific data, passed to comedi_auto_config() * * Typically called from the usb_driver (*probe) function. */ int comedi_usb_auto_config(struct usb_interface *intf, - struct comedi_driver *driver) + struct comedi_driver *driver, + unsigned long context) { - return comedi_auto_config(&intf->dev, driver, 0); + return comedi_auto_config(&intf->dev, driver, context); } EXPORT_SYMBOL_GPL(comedi_usb_auto_config); |