diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2014-05-20 16:30:08 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-30 17:33:33 (GMT) |
commit | a27f37a13cfbcfaeb987a910661a860f8d2f915e (patch) | |
tree | e01df56325f8f53d9a987506252d8901fc156b01 /drivers | |
parent | 9a028e46fc0aeb0e5036ac1f4393653404242a1a (diff) | |
download | linux-a27f37a13cfbcfaeb987a910661a860f8d2f915e.tar.xz |
usb: gadget: net2280: Refactor queues_show
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/net2280.c | 10 |
1 files changed, 1 insertions, 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 ); |