diff options
author | Felipe Balbi <balbi@ti.com> | 2014-09-29 11:13:26 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-10-20 15:58:48 -0500 |
commit | e975be287b87e0862b0f57e7326a79667e32a90a (patch) | |
tree | 0ac45fb9891914178f1a986a9eb71e31bea56b70 /drivers/usb/gadget | |
parent | c92bae753722a0010f1cabfb242581e130378b9f (diff) | |
download | blackbird-op-linux-e975be287b87e0862b0f57e7326a79667e32a90a.tar.gz blackbird-op-linux-e975be287b87e0862b0f57e7326a79667e32a90a.zip |
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')
-rw-r--r-- | drivers/usb/gadget/function/f_uvc.c | 2 |
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 |