On Tue, 24 Sep 2013, Huang Rui wrote: > 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. > > Signed-off-by: Huang Rui <ray.huang@xxxxxxx> > --- > > Changes from v1 -> v2: > - Use usb_endpoint_type routine instead of doing by hand. > > drivers/usb/misc/usbtest.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c > index aa28ac8..3e91d3e9 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: Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html