From: Shuah Khan <shuah.kh@samsung.com>
To: gregkh@linuxfoundation.org, ke42caxa@cip.cs.fau.de,
josh@joshtriplett.org, himangi774@gmail.com,
viro@zeniv.linux.org.uk
Cc: Shuah Khan <shuah.kh@samsung.com>,
linux-usb@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, shuahkhan@gmail.com
Subject: [PATCH] staging/usbip: simplify usbip_dump_usb_device() udev->speed handling
Date: Fri, 24 Jan 2014 09:25:05 -0700 [thread overview]
Message-ID: <1390580705-2012-1-git-send-email-shuah.kh@samsung.com> (raw)
Change usbip_dump_usb_device() to use usb_speed_string() and remove the
code that does switch on udev->speed and builds custom speed strings.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
drivers/staging/usbip/usbip_common.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index 4470cd3..ad5f0c8 100644
--- a/drivers/staging/usbip/usbip_common.c
+++ b/drivers/staging/usbip/usbip_common.c
@@ -99,26 +99,8 @@ static void usbip_dump_usb_device(struct usb_device *udev)
struct device *dev = &udev->dev;
int i;
- dev_dbg(dev, " devnum(%d) devpath(%s) ",
- udev->devnum, udev->devpath);
-
- switch (udev->speed) {
- case USB_SPEED_HIGH:
- pr_debug("SPD_HIGH ");
- break;
- case USB_SPEED_FULL:
- pr_debug("SPD_FULL ");
- break;
- case USB_SPEED_LOW:
- pr_debug("SPD_LOW ");
- break;
- case USB_SPEED_UNKNOWN:
- pr_debug("SPD_UNKNOWN ");
- break;
- default:
- pr_debug("SPD_ERROR ");
- break;
- }
+ dev_dbg(dev, " devnum(%d) devpath(%s) usb speed(%s)",
+ udev->devnum, udev->devpath, usb_speed_string(udev->speed));
pr_debug("tt %p, ttport %d\n", udev->tt, udev->ttport);
--
1.8.3.2
reply other threads:[~2014-01-24 16:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1390580705-2012-1-git-send-email-shuah.kh@samsung.com \
--to=shuah.kh@samsung.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=himangi774@gmail.com \
--cc=josh@joshtriplett.org \
--cc=ke42caxa@cip.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuahkhan@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).