On Thu, 15 Apr 2004, Colin Leroy wrote: > Like this one? It works. I'm a bit wondering, however, how comes > usb_interface_claimed() returns true, and the check in > usb_driver_claim_interface() passes?
While an interface is being probed, usb_interface_claimed() will always return true for it. That's because the probing code sets interface->dev.driver (which is what usb_interface_claimed() tests) before calling the probe function. If the probe fails then interface->dev.driver will be reset. This all happens inside bus_match() in drivers/base/bus.c. For the same reason, the test of (dev->driver) in usb_driver_claim_interface() -- that is the test you meant, isn't it? -- passes (i.e., yields a true value). Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
