summaryrefslogtreecommitdiff
path: root/drivers/usb/common
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2021-05-25 16:53:06 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-27 09:17:18 +0200
commitbaabd69492bbd3250467515a5a6f2bf15ade9b62 (patch)
tree3f49612a5b98940757b5a67fedb1fbad92795788 /drivers/usb/common
parent73e33008e865e5a7b79282331c2d6e920d5d47f8 (diff)
usb: common: usb-conn-gpio: use usb_role_string() to print role status
Use usb_role_string() to print role status, make the log readable. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1621932786-9335-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/common')
-rw-r--r--drivers/usb/common/usb-conn-gpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
index dfbbc4f51ed6..0158148cb054 100644
--- a/drivers/usb/common/usb-conn-gpio.c
+++ b/drivers/usb/common/usb-conn-gpio.c
@@ -83,11 +83,11 @@ static void usb_conn_detect_cable(struct work_struct *work)
else
role = USB_ROLE_NONE;
- dev_dbg(info->dev, "role %d/%d, gpios: id %d, vbus %d\n",
- info->last_role, role, id, vbus);
+ dev_dbg(info->dev, "role %s -> %s, gpios: id %d, vbus %d\n",
+ usb_role_string(info->last_role), usb_role_string(role), id, vbus);
if (info->last_role == role) {
- dev_warn(info->dev, "repeated role: %d\n", role);
+ dev_warn(info->dev, "repeated role: %s\n", usb_role_string(role));
return;
}