diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2011-03-22 09:14:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 15:38:16 -0400 |
commit | b1a873a37b6551a214ad37d1eee7654a9d65fd6e (patch) | |
tree | 3667a3d36c9f7c6ae73609004331f006751c44be /drivers/media/video/v4l2-dev.c | |
parent | 2f82441a8644287e5b647329cc30b590f6fd3714 (diff) |
[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>
Diffstat (limited to 'drivers/media/video/v4l2-dev.c')
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 1898099ec65a..498e6742579e 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -578,11 +578,9 @@ int __video_register_device(struct video_device *vdev, int type, int nr, | |||
578 | vdev->parent = vdev->v4l2_dev->dev; | 578 | vdev->parent = vdev->v4l2_dev->dev; |
579 | if (vdev->ctrl_handler == NULL) | 579 | if (vdev->ctrl_handler == NULL) |
580 | vdev->ctrl_handler = vdev->v4l2_dev->ctrl_handler; | 580 | vdev->ctrl_handler = vdev->v4l2_dev->ctrl_handler; |
581 | /* If the prio state pointer is NULL, and if the driver doesn't | 581 | /* If the prio state pointer is NULL, then use the v4l2_device |
582 | handle priorities itself, then use the v4l2_device prio | 582 | prio state. */ |
583 | state. */ | 583 | if (vdev->prio == NULL) |
584 | if (vdev->prio == NULL && vdev->ioctl_ops && | ||
585 | vdev->ioctl_ops->vidioc_s_priority == NULL) | ||
586 | vdev->prio = &vdev->v4l2_dev->prio; | 584 | vdev->prio = &vdev->v4l2_dev->prio; |
587 | } | 585 | } |
588 | 586 | ||