Browse Source

usb: gadget: function: uvc: return correct alt-setting

If our alternate setting has been selected, we must
return that on a subsequent Get Interface request
even if we're not streaming.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Felipe Balbi 11 years ago
parent
commit
e975be287b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/usb/gadget/function/f_uvc.c

+ 1 - 1
drivers/usb/gadget/function/f_uvc.c

@@ -279,7 +279,7 @@ uvc_function_get_alt(struct usb_function *f, unsigned interface)
 	else if (interface != uvc->streaming_intf)
 		return -EINVAL;
 	else
-		return uvc->state == UVC_STATE_STREAMING ? 1 : 0;
+		return uvc->video.ep->driver_data ? 1 : 0;
 }
 
 static int