diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-01-12 06:53:14 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-01-24 04:40:46 -0500 |
commit | 59f08e6d2015a16fb4856f910ef0660d13a0c767 (patch) | |
tree | 0a35e5060a81dacac7441e718c4efe0cab28b47d /drivers/usb/gadget/dummy_hcd.c | |
parent | a54c979fed31b4230b2e63132f7167206e4e5d69 (diff) |
usb: dummy_hcd: use usb_endpoint_type()
This patch makes use of usb_endpoint_type() instead of the open coding.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index e57989ccc0e5..fd4d86a57142 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -447,7 +447,7 @@ dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) | |||
447 | * especially for "ep9out" style fixed function ones.) | 447 | * especially for "ep9out" style fixed function ones.) |
448 | */ | 448 | */ |
449 | retval = -EINVAL; | 449 | retval = -EINVAL; |
450 | switch (desc->bmAttributes & 0x03) { | 450 | switch (usb_endpoint_type(desc)) { |
451 | case USB_ENDPOINT_XFER_BULK: | 451 | case USB_ENDPOINT_XFER_BULK: |
452 | if (strstr (ep->ep.name, "-iso") | 452 | if (strstr (ep->ep.name, "-iso") |
453 | || strstr (ep->ep.name, "-int")) { | 453 | || strstr (ep->ep.name, "-int")) { |
@@ -531,7 +531,7 @@ dummy_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) | |||
531 | desc->bEndpointAddress & 0x0f, | 531 | desc->bEndpointAddress & 0x0f, |
532 | (desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out", | 532 | (desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out", |
533 | ({ char *val; | 533 | ({ char *val; |
534 | switch (desc->bmAttributes & 0x03) { | 534 | switch (usb_endpoint_type(desc)) { |
535 | case USB_ENDPOINT_XFER_BULK: | 535 | case USB_ENDPOINT_XFER_BULK: |
536 | val = "bulk"; | 536 | val = "bulk"; |
537 | break; | 537 | break; |
@@ -1439,7 +1439,7 @@ static int periodic_bytes (struct dummy *dum, struct dummy_ep *ep) | |||
1439 | limit += limit * tmp; | 1439 | limit += limit * tmp; |
1440 | } | 1440 | } |
1441 | if (dum->gadget.speed == USB_SPEED_SUPER) { | 1441 | if (dum->gadget.speed == USB_SPEED_SUPER) { |
1442 | switch (ep->desc->bmAttributes & 0x03) { | 1442 | switch (usb_endpoint_type(ep->desc)) { |
1443 | case USB_ENDPOINT_XFER_ISOC: | 1443 | case USB_ENDPOINT_XFER_ISOC: |
1444 | /* Sec. 4.4.8.2 USB3.0 Spec */ | 1444 | /* Sec. 4.4.8.2 USB3.0 Spec */ |
1445 | limit = 3 * 16 * 1024 * 8; | 1445 | limit = 3 * 16 * 1024 * 8; |