Duncan Sands wrote:
Thanks a lot.  This is extremely problematic then: in usb_set_configuration,
an interface's device structure will not be completely initialized until we do
        device_add (&intf->dev);
...
What to do?

Hmm, good catch! Looks to me like usb_driver_claim_interface() will need to check whether the device has been added yet. Something like this should do it:

   intf->dev.driver = &driver->driver;
   intf->dev.driver_data = priv;
   if (!list_empty (&intf->dev.bus_list))
        device_bind_driver (&intf->dev);

Then let usb_set_configuration() do the device_add(), which will
automatically device_bind_driver() when dev->driver is set.  (And
will probe() otherwise.)

- Dave



Duncan.






-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to