[media] v4l: omap4iss: Don't reinitialize the video qlock at every streamon
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 3 Jun 2014 22:23:16 +0000 (19:23 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 17 Jul 2014 19:20:50 +0000 (16:20 -0300)
Initialize the spin lock once only when initializing the video object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/staging/media/omap4iss/iss_video.c

index cbf455d66f73e2942f5218450e367f2d65102752..56942dffe2ffe4c2babfa9fbc9bcf154f8126a40 100644 (file)
@@ -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);