usb: roles: add helper usb_role_string()
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Tue, 25 May 2021 08:53:05 +0000 (16:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 May 2021 07:17:18 +0000 (09:17 +0200)
commit73e33008e865e5a7b79282331c2d6e920d5d47f8
treec87cb860d513d1daf9143439ee66322dd21bd2fb
parenta0765597c986ad52c9bc93319987d41bc17f59ef
usb: roles: add helper usb_role_string()

Introduces usb_role_string() function, which returns a
human-readable name of provided usb role, it's useful to
make the log readable.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1621932786-9335-1-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/roles/class.c
include/linux/usb/role.h