Now
MAIN commitmail json YAML
uvideo(4): Fix USB interface numbering.
Don't try to be clever and count -- just use bInterfaceNumber.
The previous logic to count interface descriptors failed to consider
interfaces with alternate settings, which led it to pass an invalid
interface number to usbd_device2interface_handle.
It is simpler to just use the recorded bInterfaceNumber, which is
guaranteed by the USB spec to be zero-indexed and below
bNumInterfaces as we need.
Don't try to be clever and count -- just use bInterfaceNumber.
The previous logic to count interface descriptors failed to consider
interfaces with alternate settings, which led it to pass an invalid
interface number to usbd_device2interface_handle.
It is simpler to just use the recorded bInterfaceNumber, which is
guaranteed by the USB spec to be zero-indexed and below
bNumInterfaces as we need.