summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-hub.c
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2019-03-21 03:27:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-26 08:45:03 +0100
commit4d537f37e0d39f64687be71087dca607ee507f5a (patch)
tree9135adefda02e372d0d0286098e05ddf6d301ff0 /drivers/usb/host/xhci-hub.c
parentusb: typec: fusb302: Make fusb302_irq_work static (diff)
downloadlinux-4d537f37e0d39f64687be71087dca607ee507f5a.tar.xz
linux-4d537f37e0d39f64687be71087dca607ee507f5a.zip
usb: introduce usb_ep_type_string() function
In some places, the code prints a human-readable USB endpoint transfer type (e.g. "bulk"). This involves a switch statement sometimes wrapped around in ({ ... }) block leading to code repetition. To make this scenario easier, here introduces usb_ep_type_string() function, which returns a human-readable name of provided endpoint type. It also changes a few places switch was used to use this new function. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-hub.c')
0 files changed, 0 insertions, 0 deletions