summaryrefslogtreecommitdiff
path: root/drivers/media/video/meye.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-21 09:57:38 +0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 19:54:58 +0400
commita399810ca69d9d4bd30ab8c1678c7439e567f90b (patch)
tree32939ef77bc75c3a224d37cf4e885d7f808741bf /drivers/media/video/meye.c
parentb654fcdc0ea3b6e5724c9873ae062bdfe7f28efe (diff)
downloadlinux-a399810ca69d9d4bd30ab8c1678c7439e567f90b.tar.xz
V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it. This ensures a clean separation between the const ops struct and the non-const video_device struct. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/meye.c')
-rw-r--r--drivers/media/video/meye.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index a1fb9874fdcf..fd16ef0a5868 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -1698,13 +1698,7 @@ static const struct file_operations meye_fops = {
.llseek = no_llseek,
};
-static struct video_device meye_template = {
- .owner = THIS_MODULE,
- .name = "meye",
- .type = VID_TYPE_CAPTURE,
- .fops = &meye_fops,
- .release = video_device_release,
- .minor = -1,
+static const struct v4l2_ioctl_ops meye_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_enum_input = vidioc_enum_input,
.vidioc_g_input = vidioc_g_input,
@@ -1725,6 +1719,16 @@ static struct video_device meye_template = {
.vidioc_default = vidioc_default,
};
+static struct video_device meye_template = {
+ .owner = THIS_MODULE,
+ .name = "meye",
+ .type = VID_TYPE_CAPTURE,
+ .fops = &meye_fops,
+ .ioctl_ops = &meye_ioctl_ops,
+ .release = video_device_release,
+ .minor = -1,
+};
+
#ifdef CONFIG_PM
static int meye_suspend(struct pci_dev *pdev, pm_message_t state)
{