Skip to content

Commit

Permalink
usb: gadget: net2280: Refactor queues_show
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ricardo Ribalda Delgado authored and Felipe Balbi committed Jun 30, 2014
1 parent 9a028e4 commit a27f37a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions drivers/usb/gadget/net2280.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down

0 comments on commit a27f37a

Please sign in to comment.