From: Laurent Pinchart Date: Tue, 3 Jun 2014 22:23:16 +0000 (-0300) Subject: [media] v4l: omap4iss: Don't reinitialize the video qlock at every streamon X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=2b44ac9e84d583c0e25b22bd0809d9ddf0c54f6f;p=deliverable%2Flinux.git [media] v4l: omap4iss: Don't reinitialize the video qlock at every streamon Initialize the spin lock once only when initializing the video object. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index cbf455d66f73..56942dffe2ff 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -895,7 +895,6 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) video->queue = &vfh->queue; INIT_LIST_HEAD(&video->dmaqueue); - spin_lock_init(&video->qlock); video->error = false; atomic_set(&pipe->frame_number, -1); @@ -1175,6 +1174,7 @@ int omap4iss_video_init(struct iss_video *video, const char *name) if (ret < 0) return ret; + spin_lock_init(&video->qlock); mutex_init(&video->mutex); atomic_set(&video->active, 0);