USB: core: add helpers to retrieve endpoints in reverse order
authorJohan Hovold <johan@kernel.org>
Fri, 17 Mar 2017 10:35:31 +0000 (11:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Mar 2017 12:53:16 +0000 (13:53 +0100)
commit279daf4e053470f22c9421a4ab05f8e5a9e9eeec
treec516a41b345a0fc41b2757e89d4a7d82e8c3166d
parent66a359390e7e34f9a4c489467234b107b3d76169
USB: core: add helpers to retrieve endpoints in reverse order

Several drivers have implemented their endpoint look-up loops in such a
way that they have picked the last endpoint descriptor of the specified
type should more than one such descriptor exist.

To avoid any regressions, add corresponding helpers to lookup endpoints
by searching the endpoint descriptors in reverse order.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/usb.c
include/linux/usb.h