From: Ming Lei Date: Mon, 2 Aug 2010 14:09:17 +0000 (+0800) Subject: USB: usbtest: support test device with only one iso-in or iso-out endpoint X-Git-Tag: v2.6.36-rc1~293^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=951fd8ee6a9493f80bc5bccf2c8cfa1535c6ce15;p=platform%2Fkernel%2Flinux-3.10.git USB: usbtest: support test device with only one iso-in or iso-out endpoint It is very common that one altsetting may include only one iso-in or iso-out single endpoint, especially for high bandwidth endpoint, so support it. Signed-off-by: Ming Lei Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index d92b7ec..eef370e 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c @@ -136,7 +136,7 @@ try_iso: iso_out = e; } } - if ((in && out) || (iso_in && iso_out)) + if ((in && out) || iso_in || iso_out) goto found; } return -EINVAL; @@ -162,6 +162,9 @@ found: dev->in_iso_pipe = usb_rcvisocpipe (udev, iso_in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); + } + + if (iso_out) { dev->iso_out = &iso_out->desc; dev->out_iso_pipe = usb_sndisocpipe (udev, iso_out->desc.bEndpointAddress