Am Donnerstag, 25. Januar 2007 16:16 schrieb Oleg Verych:
> On Thu, Jan 25, 2007 at 03:53:58PM +0100, Oliver Neukum wrote:
> [] 
> > Yes, there is something wrong with the design of this device.
> > For these cases there's
> > int usb_driver_set_configuration(struct usb_device *udev, int config)
> > 
> > You check the current configuration probe() is called with, call
> > this helper function and exit with an error from probe.
> 
> It is relatively new. As comment states, it doesn't guarantee
> anything, caller hangs in air...

Yes, unfortunately this is true. However, as I understand it, you are
helpless if you are called with the wrong configuration. So you don't really
lose anything.
If you wish to, you can return 0 from probe() and you'll be disconnected
from the device by the change of configuration.

The alternative is a deep change to the API for one odd type of device.
Do you absolutely need an error return?

        Regards
                Oliver

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to