On Mon, Oct 27, 2003 at 11:10:22AM -0500, Alan Stern wrote:
> This patch makes config.c more liberal about the sorts of interface 
> numbering it will accept when reading interface descriptors.  The current 
> code only allows interfaces numbered 0..(bNumInterfaces-1), but a number 
> of devices erroneously number their interfaces starting at 1.
> 
> With this patch, the code will accept a total of bNumInterfaces with 
> numbers in the interval 0..bNumInterfaces.  That will accomodate origin-1 
> indexing (and a few other things beside).  Also included is a comment in 
> include/linux/usb.h warning people that the interface numbers might not 
> correspond to the locations in the usb_host_config->interface[] array and 
> telling them they should use usb_ifnum_to_if().

Wow, this looks a bit more complex than is probably needed, right?

Any reason you sort the interfaces?  Is that really needed?  Why not
just accept the fact that the interfaces in the array, might not be in
the order specificed by the interface number?  That's what 2.4 does and
2.6 used to do and has worked quite well so far, right?

thanks,

greg k-h


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to