From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
To: balbi@ti.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
joe@perches.com, auttamchandani@logicube.com,
stern@rowland.harvard.edu
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Subject: [PATCH 06/10] usb: gadget: net2280: Refactor queues_show
Date: Tue, 20 May 2014 18:30:08 +0200 [thread overview]
Message-ID: <1400603412-19406-7-git-send-email-ricardo.ribalda@gmail.com> (raw)
In-Reply-To: <1400603412-19406-1-git-send-email-ricardo.ribalda@gmail.com>
Replace a long and ugly expresion with an already available function.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
drivers/usb/gadget/net2280.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index bd851de..c3205ec 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -1777,15 +1777,7 @@ static ssize_t queues_show(struct device *_dev, struct device_attribute *attr,
"\n%s (ep%d%s-%s) max %04x %s fifo %d\n",
ep->ep.name, t & USB_ENDPOINT_NUMBER_MASK,
(t & USB_DIR_IN) ? "in" : "out",
- ({ char *val;
- switch (d->bmAttributes & 0x03) {
- case USB_ENDPOINT_XFER_BULK:
- val = "bulk"; break;
- case USB_ENDPOINT_XFER_INT:
- val = "intr"; break;
- default:
- val = "iso"; break;
- } val; }),
+ type_string(d->bmAttributes),
usb_endpoint_maxp (d) & 0x1fff,
ep->dma ? "dma" : "pio", ep->fifo_size
);
--
2.0.0.rc2
next prev parent reply other threads:[~2014-05-20 16:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 16:30 [PATCH 00/10] net2280: Support for PLX USB338x and cleanout code Ricardo Ribalda Delgado
2014-05-20 16:30 ` [PATCH 01/10 v5.1] usb: gadget: net2280: Add support for PLX USB338X Ricardo Ribalda Delgado
2014-05-20 16:30 ` [PATCH 02/10] usb: gadget: net2280: Dont use magic numbers Ricardo Ribalda Delgado
2014-05-20 16:30 ` [PATCH 03/10] usb: gadget: net2280: Use BIT() macro Ricardo Ribalda Delgado
2014-05-20 16:30 ` [PATCH 04/10] usb: gadget: net2280: Use true/false instead of 1/0 Ricardo Ribalda Delgado
2014-05-20 16:30 ` [PATCH 05/10] usb: gadget: net2280: Use module_pci_driver macro Ricardo Ribalda Delgado
2014-05-20 16:30 ` Ricardo Ribalda Delgado [this message]
2014-05-20 16:30 ` [PATCH 07/10 v3] usb: gadget: net2280: Pass checkpacth.pl test Ricardo Ribalda Delgado
2014-05-20 16:30 ` [PATCH 08/10 v2.1] usb: gadget: net2280: Code Cleanup Ricardo Ribalda Delgado
2014-05-20 16:30 ` [PATCH 09/10 v2.1] usb: gadget: net2280: Use pr_* function Ricardo Ribalda Delgado
2014-05-20 16:30 ` [PATCH 10/10] usb: gadget: net2280: Use quirks instead of pci id Ricardo Ribalda Delgado
2014-06-10 20:19 ` [PATCH 00/10] net2280: Support for PLX USB338x and cleanout code Ricardo Ribalda Delgado
2014-06-30 19:30 ` Ricardo Ribalda Delgado
2014-06-30 19:38 ` Felipe Balbi
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=1400603412-19406-7-git-send-email-ricardo.ribalda@gmail.com \
--to=ricardo.ribalda@gmail.com \
--cc=auttamchandani@logicube.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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®