projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a028e4
)
usb: gadget: net2280: Refactor queues_show
author
Ricardo Ribalda Delgado
<ricardo.ribalda@gmail.com>
Tue, 20 May 2014 16:30:08 +0000
(18:30 +0200)
committer
Felipe Balbi
<balbi@ti.com>
Mon, 30 Jun 2014 17:33:33 +0000
(12:33 -0500)
Replace a long and ugly expresion with an already available function.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/net2280.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/net2280.c
b/drivers/usb/gadget/net2280.c
index bd851de7112b71a0a09c3d56768481a5caf441ac..c3205ec9560c0e07a322ef4a60819af97ea657b4 100644
(file)
--- 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
);