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>
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 @@
* 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);