mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
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>
This commit is contained in:
parent
73e33008e8
commit
baabd69492
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user