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: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录