[media] v4l2-dev: add flag to have the core lock all file operations
[firefly-linux-kernel-4.4.55.git] / drivers / media / video / davinci / vpif_display.c
index 7fa34b4fae26f392c33d55c339a43de31f49edff..e6488ee7db1877510a490724c7311f5f98f16e78 100644 (file)
@@ -1778,6 +1778,10 @@ static __init int vpif_probe(struct platform_device *pdev)
                v4l2_prio_init(&ch->prio);
                ch->common[VPIF_VIDEO_INDEX].fmt.type =
                                                V4L2_BUF_TYPE_VIDEO_OUTPUT;
+               /* Locking in file operations other than ioctl should be done
+                  by the driver, not the V4L2 core.
+                  This driver needs auditing so that this flag can be removed. */
+               set_bit(V4L2_FL_LOCK_ALL_FOPS, &ch->video_dev->flags);
                ch->video_dev->lock = &common->lock;
 
                /* register video device */