[PATCH] USB: Changes to core/config.c (7 of 9)
This patch changes the usb_parse_interface() routine so that it only handles a single interface/altsetting descriptor at a time, rather than trying to handle all the altsettings for an interface at once. Besides shrinking the code slightly, this has the advantage of not requiring the interfaces to be listed in order or all the altsetting descriptors for an interface to be contiguous. While there probably aren't any devices that have _discontiguous_ altsetting descriptors, there's no harm in allowing it -- particularly since doing so provides an overall simplification. This is another of those hard-to-read patches. It moves most of the body of the usb_parse_interface() function out of a loop, thereby changing the indentation level without actually altering the code.
Showing
Please register or sign in to comment