xhci: Add option to get next extended capability in list by passing id = 0
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 20 Mar 2018 12:57:08 +0000 (15:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 12:40:10 +0000 (13:40 +0100)
commitd0a0fa9d74b9ba3b24b43fd50c318c27dc34c06f
tree477447040c6549af9579f9f545064a34395ac049
parent2000016c94b4f724cb5851486b9f9a94e8da32fc
xhci: Add option to get next extended capability in list by passing id = 0

Modify xhci_find_next_ext_cap(base, offset, id) to return the next
capability offset if 0 is passed for id. Otherwise it will behave as
previously and return the offset of the next capability with matching id

capability id 0 is not used by xHCI (reserved)

This is useful when we want to loop through all capabilities.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ext-caps.h