summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2013-09-24 00:03:43 +0800
committerFelipe Balbi <balbi@ti.com>2013-10-01 09:39:07 -0500
commit77a3a0aa39da49499c4029ee8c4227dac362a076 (patch)
tree9950d4d917869b4757409320f50229657a7131b8 /drivers/usb
parentd9681ee0812a7502838032bc5f935c2af650b036 (diff)
usb: usbtest: bmAttributes would better be masked
When transfer type is isochronous, the other bits (bits 5..2) of bmAttributes in endpoint descriptor might not be set zero. So it's better to use usb_endpoint_type routine to mask bmAttributes with USB_ENDPOINT_XFERTYPE_MASK to judge the transfter type later. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/misc/usbtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index aa28ac8c760..3e91d3e98ee 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -120,7 +120,7 @@ get_endpoints(struct usbtest_dev *dev, struct usb_interface *intf)
struct usb_host_endpoint *e;
e = alt->endpoint + ep;
- switch (e->desc.bmAttributes) {
+ switch (usb_endpoint_type(&e->desc)) {
case USB_ENDPOINT_XFER_BULK:
break;
case USB_ENDPOINT_XFER_ISOC: