Skip to content

Commit

Permalink
usb: gadget: function: uvc: return correct alt-setting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi committed Oct 20, 2014
1 parent c92bae7 commit e975be2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/function/f_uvc.c
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e975be2

Please sign in to comment.