diff options
author | Tatyana Brokhman <tlinder@codeaurora.org> | 2011-06-28 09:33:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 14:19:40 -0400 |
commit | 7c884fe4d74d17efc83b19f3dc898a75f03859e9 (patch) | |
tree | 4a1480cb36749c942e586c48dc446af8718a3b93 | |
parent | ea2a1df7b2b1de839a72217d85bfb4b7b049010c (diff) |
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: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/gadget/composite.c | 16 | ||||
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 48 |
2 files changed, 48 insertions, 16 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 1c6bd666150a..ed8a70f271f4 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
@@ -495,10 +495,18 @@ static int set_config(struct usb_composite_dev *cdev, | |||
495 | INFO(cdev, "%s speed config #%d: %s\n", | 495 | INFO(cdev, "%s speed config #%d: %s\n", |
496 | ({ char *speed; | 496 | ({ char *speed; |
497 | switch (gadget->speed) { | 497 | switch (gadget->speed) { |
498 | case USB_SPEED_LOW: speed = "low"; break; | 498 | case USB_SPEED_LOW: |
499 | case USB_SPEED_FULL: speed = "full"; break; | 499 | speed = "low"; |
500 | case USB_SPEED_HIGH: speed = "high"; break; | 500 | break; |
501 | default: speed = "?"; break; | 501 | case USB_SPEED_FULL: |
502 | speed = "full"; | ||
503 | break; | ||
504 | case USB_SPEED_HIGH: | ||
505 | speed = "high"; | ||
506 | break; | ||
507 | default: | ||
508 | speed = "?"; | ||
509 | break; | ||
502 | } ; speed; }), number, c ? c->label : "unconfigured"); | 510 | } ; speed; }), number, c ? c->label : "unconfigured"); |
503 | 511 | ||
504 | if (!c) | 512 | if (!c) |
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index d47a565d085c..cbcb4c7fd26c 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -425,10 +425,18 @@ dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) | |||
425 | (desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out", | 425 | (desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out", |
426 | ({ char *val; | 426 | ({ char *val; |
427 | switch (desc->bmAttributes & 0x03) { | 427 | switch (desc->bmAttributes & 0x03) { |
428 | case USB_ENDPOINT_XFER_BULK: val = "bulk"; break; | 428 | case USB_ENDPOINT_XFER_BULK: |
429 | case USB_ENDPOINT_XFER_ISOC: val = "iso"; break; | 429 | val = "bulk"; |
430 | case USB_ENDPOINT_XFER_INT: val = "intr"; break; | 430 | break; |
431 | default: val = "ctrl"; break; | 431 | case USB_ENDPOINT_XFER_ISOC: |
432 | val = "iso"; | ||
433 | break; | ||
434 | case USB_ENDPOINT_XFER_INT: | ||
435 | val = "intr"; | ||
436 | break; | ||
437 | default: | ||
438 | val = "ctrl"; | ||
439 | break; | ||
432 | }; val; }), | 440 | }; val; }), |
433 | max); | 441 | max); |
434 | 442 | ||
@@ -1798,18 +1806,34 @@ show_urb (char *buf, size_t size, struct urb *urb) | |||
1798 | urb, | 1806 | urb, |
1799 | ({ char *s; | 1807 | ({ char *s; |
1800 | switch (urb->dev->speed) { | 1808 | switch (urb->dev->speed) { |
1801 | case USB_SPEED_LOW: s = "ls"; break; | 1809 | case USB_SPEED_LOW: |
1802 | case USB_SPEED_FULL: s = "fs"; break; | 1810 | s = "ls"; |
1803 | case USB_SPEED_HIGH: s = "hs"; break; | 1811 | break; |
1804 | default: s = "?"; break; | 1812 | case USB_SPEED_FULL: |
1813 | s = "fs"; | ||
1814 | break; | ||
1815 | case USB_SPEED_HIGH: | ||
1816 | s = "hs"; | ||
1817 | break; | ||
1818 | default: | ||
1819 | s = "?"; | ||
1820 | break; | ||
1805 | }; s; }), | 1821 | }; s; }), |
1806 | ep, ep ? (usb_pipein (urb->pipe) ? "in" : "out") : "", | 1822 | ep, ep ? (usb_pipein (urb->pipe) ? "in" : "out") : "", |
1807 | ({ char *s; \ | 1823 | ({ char *s; \ |
1808 | switch (usb_pipetype (urb->pipe)) { \ | 1824 | switch (usb_pipetype (urb->pipe)) { \ |
1809 | case PIPE_CONTROL: s = ""; break; \ | 1825 | case PIPE_CONTROL: \ |
1810 | case PIPE_BULK: s = "-bulk"; break; \ | 1826 | s = ""; \ |
1811 | case PIPE_INTERRUPT: s = "-int"; break; \ | 1827 | break; \ |
1812 | default: s = "-iso"; break; \ | 1828 | case PIPE_BULK: \ |
1829 | s = "-bulk"; \ | ||
1830 | break; \ | ||
1831 | case PIPE_INTERRUPT: \ | ||
1832 | s = "-int"; \ | ||
1833 | break; \ | ||
1834 | default: \ | ||
1835 | s = "-iso"; \ | ||
1836 | break; \ | ||
1813 | }; s;}), | 1837 | }; s;}), |
1814 | urb->actual_length, urb->transfer_buffer_length); | 1838 | urb->actual_length, urb->transfer_buffer_length); |
1815 | } | 1839 | } |