diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2011-05-30 14:02:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-06-30 22:19:16 -0400 |
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) | |||
1255 | 1255 | ||
1256 | /* Commit the streaming parameters. */ | 1256 | /* Commit the streaming parameters. */ |
1257 | ret = uvc_commit_video(stream, &stream->ctrl); | 1257 | ret = uvc_commit_video(stream, &stream->ctrl); |
1258 | if (ret < 0) | 1258 | if (ret < 0) { |
1259 | uvc_queue_enable(&stream->queue, 0); | ||
1259 | return ret; | 1260 | return ret; |
1261 | } | ||
1260 | 1262 | ||
1261 | return uvc_init_video(stream, GFP_KERNEL); | 1263 | return uvc_init_video(stream, GFP_KERNEL); |
1262 | } | 1264 | } |