summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-sm501.c
diff options
context:
space:
mode:
authorNiklas Neronin <niklas.neronin@linux.intel.com>2024-02-29 17:14:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-02 22:25:27 +0300
commit2e8dd2ded2a18c9ef83ad1c84547948fc64b6155 (patch)
treeab6835dbafde8ccb42e494af6b696f9c1a1c9f9c /drivers/usb/host/ohci-sm501.c
parent00bdc4a34b2885f54468d4bdbb56d4055ce20ac9 (diff)
downloadlinux-2e8dd2ded2a18c9ef83ad1c84547948fc64b6155.tar.xz
usb: xhci: utilize 'xhci_free_segments_for_ring()' for freeing segments
Refactor the code to improve readability by using 'xhci_free_segments_for_ring()' function for freeing ring segments. This replaces the custom while loop previously used within 'xhci_ring_expansion()' and 'xhci_alloc_segments_for_ring()'. Slightly modify 'xhci_free_segments_for_ring()' to handle lists which do not loop. This makes it possible to use it in error paths of 'xhci_alloc_segments_for_ring()'. This change also prepares for switching the custom xhci linked segment list into to more standard list.h lists. [minor commit message rewording -Mathias] Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20240229141438.619372-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-sm501.c')
0 files changed, 0 insertions, 0 deletions