• Mathias Nyman's avatar
    xhci: rework xhci extended capability list parsing functions · d5ddcdf4
    Mathias Nyman authored
    Replace the existing two extended capability parsing helper functions with
    one called xhci_find_next_ext_cap().
    
    The extended capabilities are read both in pci-quirks before xhci driver is
    loaded, and inside the xhci driver when adding ports. The existing helpers
    did not suit well for these cases and a lot of custom parsing code was
    needed.
    
    The new helper function simplifies these two cases a lot.
    
    The motivation for this rework was that code to support xhci debug
    capability needed to parse extended capabilities, and it included
    yet another capability parsing helper specific for its needs. With
    this solution it debug capability code can use this new  helper as well
    Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d5ddcdf4
xhci-mem.c 75.4 KB