From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
Chunfeng Yun <chunfeng.yun@mediatek.com>,
Thierry Reding <treding@nvidia.com>,
Paul Cercueil <paul@crapouillou.net>,
Lee Jones <lee.jones@linaro.org>,
Guenter Roeck <linux@roeck-us.net>,
Hans de Goede <hdegoede@redhat.com>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>
Subject: [PATCH 2/2] usb: common: usb-conn-gpio: use usb_role_string() to print role status
Date: Tue, 25 May 2021 16:53:06 +0800 [thread overview]
Message-ID: <1621932786-9335-2-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1621932786-9335-1-git-send-email-chunfeng.yun@mediatek.com>
Use usb_role_string() to print role status, make the log readable.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/common/usb-conn-gpio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c
index 65d89140cd19..7dbe8baed029 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;
}
--
2.18.0
next prev parent reply other threads:[~2021-05-25 8:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 8:53 [PATCH 1/2] usb: roles: add helper usb_role_string() Chunfeng Yun
2021-05-25 8:53 ` Chunfeng Yun [this message]
2021-05-26 6:31 ` Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1621932786-9335-2-git-send-email-chunfeng.yun@mediatek.com \
--to=chunfeng.yun@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=matthias.bgg@gmail.com \
--cc=paul@crapouillou.net \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®