• Alan Stern's avatar
    [PATCH] USB: Remove interface/altsetting assumptions from usb-midi · c5cd1f9d
    Alan Stern authored
    This patch makes the usb-midi driver use usb_ifnum_to_if(), thereby
    removing assumptions about which interface is stored in which array entry.
    Similarly, it stores the bAlternateSetting value rather than the array
    index for an altsetting entry.
    
    Like the earlier patch for the audio driver, this also changes the driver
    to use the in-memory rawdescriptor buffer rather than reading a
    configuration descriptor from the device.  Unlike that earlier patch, this
    time there's no question that the deallocation of the buffer is done
    correctly.  (I suspect the audio driver just left out a call to kfree.)
    c5cd1f9d
usb-midi.c 53.3 KB