Commit ef1ee8cf authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: usbdux: push usb (*probe) into comedi (*auto_attach)

The usb_driver (*probe) calls comedi_usb_auto_config() after finding a
free slot for the static private data and doind some initial allocation
and setup. The comedi_usb_auto_config() will then call the comedi_driver
(*auto_attach).

Move all the probe/auto_attach into the comedi_driver and just have the
usb_driver call comedi_usb_auto_config(). This allows the comedi_driver
to allocate the private data and removes the need for the static array
and the semaphore that protects it.

Since all the probe/auto_attach is now handled by the comedi_driver, we
can also remove the 'attached' and 'probed' information from the private
data. The subdevice functions will only be hooked up if the usb device
has been probed and the comedi device is attached.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a7dd65f5
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment