diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2011-02-24 16:42:24 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 22:37:55 +0300 |
commit | 0f62fd6a2fa12d6a63cbb18f9e30b05345f636f6 (patch) | |
tree | b5963e3b4a5e859949f0f76b96c58c503a30efa4 /drivers/media/video/v4l2-dev.c | |
parent | 022654930891c7ddfdb1ea34d6c4af9d1096bf91 (diff) | |
download | linux-0f62fd6a2fa12d6a63cbb18f9e30b05345f636f6.tar.xz |
[media] v4l2: add v4l2_prio_state to v4l2_device and video_device
Integrate the v4l2_prio_state into the core, ready for use.
One struct v4l2_prio_state is added to v4l2_device and a pointer
to a prio state is added to video_device.
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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 65d546f35ef4..6b1ef85d8cc8 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c @@ -573,6 +573,12 @@ int __video_register_device(struct video_device *vdev, int type, int nr, 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) + vdev->prio = &vdev->v4l2_dev->prio; } /* Part 2: find a free minor, device node number and device index. */ |