diff options
author | Sjoerd Simons | 2011-05-30 15:02:00 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab | 2011-06-30 23:19:16 -0300 |
commit | aa122d424b14b4a4c5ba302e668366717e9cac7b (patch) | |
tree | a15d7d1f4fb63e24f5d7940bf76eca7673a9bab8 /drivers/media | |
parent | 8ca2c80b170c47eeb55f0c2a0f2b8edf85f35d49 (diff) |
[media] uvcvideo: Disable the queue when failing to start
When failing to start the camera we should disable the queue again, to
rollback into the same initial state. Otherwise re-trying will always
hit -EBUSY
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/uvc/uvc_video.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index fc766b9f24c5..49994793cc77 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c @@ -1255,8 +1255,10 @@ int uvc_video_enable(struct uvc_streaming *stream, int enable) /* Commit the streaming parameters. */ ret = uvc_commit_video(stream, &stream->ctrl); - if (ret < 0) + if (ret < 0) { + uvc_queue_enable(&stream->queue, 0); return ret; + } return uvc_init_video(stream, GFP_KERNEL); } |