[media] v4l2: use new flag to enable core priority handling
Rather than guess which driver supports core priority handling, require drivers
that do to explicitly set the V4L2_FL_USE_FH_PRIO flag in video_device.
Updated the core prio handling accordingly and set the flag in the three
drivers that do.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index 1898099..498e674 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -578,11 +578,9 @@
vdev->parent = vdev->v4l2_dev->dev;
if (vdev->ctrl_handler == NULL)
vdev->ctrl_handler = vdev->v4l2_dev->ctrl_handler;
- /* If the prio state pointer is NULL, and if the driver doesn't
- handle priorities itself, then use the v4l2_device prio
- state. */
- if (vdev->prio == NULL && vdev->ioctl_ops &&
- vdev->ioctl_ops->vidioc_s_priority == NULL)
+ /* If the prio state pointer is NULL, then use the v4l2_device
+ prio state. */
+ if (vdev->prio == NULL)
vdev->prio = &vdev->v4l2_dev->prio;
}