[media] v4l2-dev: remove V4L2_FL_LOCK_ALL_FOPS

All drivers that needed V4L2_FL_LOCK_ALL_FOPS have been converted,
so remove this flag altogether.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c
index 268c7dd..4da3df6 100644
--- a/drivers/media/video/videobuf2-core.c
+++ b/drivers/media/video/videobuf2-core.c
@@ -2270,10 +2270,9 @@
 {
 	struct video_device *vdev = video_devdata(file);
 	struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock;
-	bool must_lock = !test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags) && lock;
 	int err = -EBUSY;
 
-	if (must_lock && mutex_lock_interruptible(lock))
+	if (lock && mutex_lock_interruptible(lock))
 		return -ERESTARTSYS;
 	if (vb2_queue_is_busy(vdev, file))
 		goto exit;
@@ -2282,7 +2281,7 @@
 	if (err >= 0)
 		vdev->queue->owner = file->private_data;
 exit:
-	if (must_lock)
+	if (lock)
 		mutex_unlock(lock);
 	return err;
 }
@@ -2293,10 +2292,9 @@
 {
 	struct video_device *vdev = video_devdata(file);
 	struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock;
-	bool must_lock = !test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags) && vdev->lock;
 	int err = -EBUSY;
 
-	if (must_lock && mutex_lock_interruptible(lock))
+	if (lock && mutex_lock_interruptible(lock))
 		return -ERESTARTSYS;
 	if (vb2_queue_is_busy(vdev, file))
 		goto exit;
@@ -2305,7 +2303,7 @@
 	if (err >= 0)
 		vdev->queue->owner = file->private_data;
 exit:
-	if (must_lock)
+	if (lock)
 		mutex_unlock(lock);
 	return err;
 }
@@ -2319,11 +2317,6 @@
 	unsigned long req_events = poll_requested_events(wait);
 	unsigned res;
 	void *fileio;
-	/* Yuck. We really need to get rid of this flag asap. If it is
-	   set, then the core took the serialization lock before calling
-	   poll(). This is being phased out, but for now we have to handle
-	   this case. */
-	bool locked = test_bit(V4L2_FL_LOCK_ALL_FOPS, &vdev->flags);
 	bool must_lock = false;
 
 	/* Try to be smart: only lock if polling might start fileio,
@@ -2339,9 +2332,9 @@
 
 	/* If locking is needed, but this helper doesn't know how, then you
 	   shouldn't be using this helper but you should write your own. */
-	WARN_ON(must_lock && !locked && !lock);
+	WARN_ON(must_lock && !lock);
 
-	if (must_lock && !locked && lock && mutex_lock_interruptible(lock))
+	if (must_lock && lock && mutex_lock_interruptible(lock))
 		return POLLERR;
 
 	fileio = q->fileio;
@@ -2351,7 +2344,7 @@
 	/* If fileio was started, then we have a new queue owner. */
 	if (must_lock && !fileio && q->fileio)
 		q->owner = file->private_data;
-	if (must_lock && !locked && lock)
+	if (must_lock && lock)
 		mutex_unlock(lock);
 	return res;
 }