From: Sjoerd Simons Date: Mon, 30 May 2011 18:02:00 +0000 (-0300) Subject: [media] uvcvideo: Disable the queue when failing to start X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa122d424b14b4a4c5ba302e668366717e9cac7b;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [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 Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- 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); }