These questions seem to have gotten lost in the shuffle.

On Mon, 23 Jun 2003, Tuukka Toivonen wrote:

> When an USB driver returns non-NULL from usb_probe(),
> the interface is automatically allocated to it as if it would have
> called usb_driver_claim_interface(). Right?

Yes.

> And this allocated interface does not need to be released at
> usb_disconnect() i.e. usb_driver_release_interface() does not need to be
> called. Right again?

Yes again.

> The documentation says
> 
> "In the disconnect function you do not have to release any interfaces
> that were additionally claimed in the probe function."
> 
> I don't quite understand what that _additionally_-word actually means in
> that sentence. Additionally to what?

In addition to the interface that was passed as an argument to the probe 
function.  If probe() returns non-zero, your driver is bound to the 
interface that was passed to probe().  But you may have used 
usb_driver_claim_interface() to bind to other interfaces _in addition to 
that one_.

What will happen is that your disconnect() function will get called once 
for each interface you have bound to your driver.  Each time it returns 
your driver will be unbound from that particular interface.  So if you 
have claimed 3 interfaces then disconnect() will be called 3 times, at the 
end of which your driver will have been unbound from all 3 interfaces.  
And there's no need to call usb_driver_release_interface().

> OK, that was all questions this time. They were simple, but I wanted to get
> rid of "FIXME"s from my driver source.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to