diff options
author | Felipe Balbi <balbi@ti.com> | 2014-09-29 12:13:26 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-10-20 16:58:48 -0400 |
commit | e975be287b87e0862b0f57e7326a79667e32a90a (patch) | |
tree | 0ac45fb9891914178f1a986a9eb71e31bea56b70 /drivers/usb | |
parent | c92bae753722a0010f1cabfb242581e130378b9f (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')
-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) | |||
279 | else if (interface != uvc->streaming_intf) | 279 | else if (interface != uvc->streaming_intf) |
280 | return -EINVAL; | 280 | return -EINVAL; |
281 | else | 281 | else |
282 | return uvc->state == UVC_STATE_STREAMING ? 1 : 0; | 282 | return uvc->video.ep->driver_data ? 1 : 0; |
283 | } | 283 | } |
284 | 284 | ||
285 | static int | 285 | static int |