summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/f_uvc.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-09-29 11:13:26 -0500
committerFelipe Balbi <balbi@ti.com>2014-10-20 15:58:48 -0500
commite975be287b87e0862b0f57e7326a79667e32a90a (patch)
tree0ac45fb9891914178f1a986a9eb71e31bea56b70 /drivers/usb/gadget/function/f_uvc.c
parentc92bae753722a0010f1cabfb242581e130378b9f (diff)
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>
Diffstat (limited to 'drivers/usb/gadget/function/f_uvc.c')
-rw-r--r--drivers/usb/gadget/function/f_uvc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index e00e8b79390a..4138ad5adb77 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/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