Commit 7c884fe4 authored by Tatyana Brokhman's avatar Tatyana Brokhman Committed by Greg Kroah-Hartman

usb: gadget: coding style fix

fix the coding style of a few switches on the
gadget framework.

[ balbi@ti.com : add a commit log ]
Signed-off-by: default avatarTatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ea2a1df7
...@@ -495,10 +495,18 @@ static int set_config(struct usb_composite_dev *cdev, ...@@ -495,10 +495,18 @@ static int set_config(struct usb_composite_dev *cdev,
INFO(cdev, "%s speed config #%d: %s\n", INFO(cdev, "%s speed config #%d: %s\n",
({ char *speed; ({ char *speed;
switch (gadget->speed) { switch (gadget->speed) {
case USB_SPEED_LOW: speed = "low"; break; case USB_SPEED_LOW:
case USB_SPEED_FULL: speed = "full"; break; speed = "low";
case USB_SPEED_HIGH: speed = "high"; break; break;
default: speed = "?"; break; case USB_SPEED_FULL:
speed = "full";
break;
case USB_SPEED_HIGH:
speed = "high";
break;
default:
speed = "?";
break;
} ; speed; }), number, c ? c->label : "unconfigured"); } ; speed; }), number, c ? c->label : "unconfigured");
if (!c) if (!c)
......
...@@ -425,10 +425,18 @@ dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) ...@@ -425,10 +425,18 @@ dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
(desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out", (desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out",
({ char *val; ({ char *val;
switch (desc->bmAttributes & 0x03) { switch (desc->bmAttributes & 0x03) {
case USB_ENDPOINT_XFER_BULK: val = "bulk"; break; case USB_ENDPOINT_XFER_BULK:
case USB_ENDPOINT_XFER_ISOC: val = "iso"; break; val = "bulk";
case USB_ENDPOINT_XFER_INT: val = "intr"; break; break;
default: val = "ctrl"; break; case USB_ENDPOINT_XFER_ISOC:
val = "iso";
break;
case USB_ENDPOINT_XFER_INT:
val = "intr";
break;
default:
val = "ctrl";
break;
}; val; }), }; val; }),
max); max);
...@@ -1798,18 +1806,34 @@ show_urb (char *buf, size_t size, struct urb *urb) ...@@ -1798,18 +1806,34 @@ show_urb (char *buf, size_t size, struct urb *urb)
urb, urb,
({ char *s; ({ char *s;
switch (urb->dev->speed) { switch (urb->dev->speed) {
case USB_SPEED_LOW: s = "ls"; break; case USB_SPEED_LOW:
case USB_SPEED_FULL: s = "fs"; break; s = "ls";
case USB_SPEED_HIGH: s = "hs"; break; break;
default: s = "?"; break; case USB_SPEED_FULL:
s = "fs";
break;
case USB_SPEED_HIGH:
s = "hs";
break;
default:
s = "?";
break;
}; s; }), }; s; }),
ep, ep ? (usb_pipein (urb->pipe) ? "in" : "out") : "", ep, ep ? (usb_pipein (urb->pipe) ? "in" : "out") : "",
({ char *s; \ ({ char *s; \
switch (usb_pipetype (urb->pipe)) { \ switch (usb_pipetype (urb->pipe)) { \
case PIPE_CONTROL: s = ""; break; \ case PIPE_CONTROL: \
case PIPE_BULK: s = "-bulk"; break; \ s = ""; \
case PIPE_INTERRUPT: s = "-int"; break; \ break; \
default: s = "-iso"; break; \ case PIPE_BULK: \
s = "-bulk"; \
break; \
case PIPE_INTERRUPT: \
s = "-int"; \
break; \
default: \
s = "-iso"; \
break; \
}; s;}), }; s;}),
urb->actual_length, urb->transfer_buffer_length); urb->actual_length, urb->transfer_buffer_length);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment