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: https://git.stricted.de/?a=commitdiff_plain;h=2b44ac9e84d583c0e25b22bd0809d9ddf0c54f6f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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);