summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-05-30 15:02:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-06-30 23:19:16 -0300
commitaa122d424b14b4a4c5ba302e668366717e9cac7b (patch)
treea15d7d1f4fb63e24f5d7940bf76eca7673a9bab8 /drivers
parent8ca2c80b170c47eeb55f0c2a0f2b8edf85f35d49 (diff)
downloadlwn-aa122d424b14b4a4c5ba302e668366717e9cac7b.tar.gz
lwn-aa122d424b14b4a4c5ba302e668366717e9cac7b.zip
[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')
-rw-r--r--drivers/media/video/uvc/uvc_video.c4
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);
}