• Alan Stern's avatar
    [PATCH] USB: Changes to core/config.c (6 of 9) · 46c4d99b
    Alan Stern authored
    This patch removes the home-brewed resizeable arrays used to store
    altsetting structures, along with the now-unneeded max_altsetting field.
    Since we are already making a preliminary pass through all the descriptors
    to check their lengths, we take the opportunity to also count the number
    of altsetting descriptors for each interface.  Then exactly the right
    number can be allocated all at once.
    
    This also moves the code that allocates the altsettings outside the
    usb_parse_interface() routine.  Though not important now, this change will
    come in handy in the next patch.
    46c4d99b
config.c 12.6 KB