diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-21 01:57:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-26 11:54:58 -0400 |
commit | a399810ca69d9d4bd30ab8c1678c7439e567f90b (patch) | |
tree | 32939ef77bc75c3a224d37cf4e885d7f808741bf /drivers/media/video/meye.c | |
parent | b654fcdc0ea3b6e5724c9873ae062bdfe7f28efe (diff) |
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.c | 18 |
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 = { | |||
1698 | .llseek = no_llseek, | 1698 | .llseek = no_llseek, |
1699 | }; | 1699 | }; |
1700 | 1700 | ||
1701 | static struct video_device meye_template = { | 1701 | static const struct v4l2_ioctl_ops meye_ioctl_ops = { |
1702 | .owner = THIS_MODULE, | ||
1703 | .name = "meye", | ||
1704 | .type = VID_TYPE_CAPTURE, | ||
1705 | .fops = &meye_fops, | ||
1706 | .release = video_device_release, | ||
1707 | .minor = -1, | ||
1708 | .vidioc_querycap = vidioc_querycap, | 1702 | .vidioc_querycap = vidioc_querycap, |
1709 | .vidioc_enum_input = vidioc_enum_input, | 1703 | .vidioc_enum_input = vidioc_enum_input, |
1710 | .vidioc_g_input = vidioc_g_input, | 1704 | .vidioc_g_input = vidioc_g_input, |
@@ -1725,6 +1719,16 @@ static struct video_device meye_template = { | |||
1725 | .vidioc_default = vidioc_default, | 1719 | .vidioc_default = vidioc_default, |
1726 | }; | 1720 | }; |
1727 | 1721 | ||
1722 | static struct video_device meye_template = { | ||
1723 | .owner = THIS_MODULE, | ||
1724 | .name = "meye", | ||
1725 | .type = VID_TYPE_CAPTURE, | ||
1726 | .fops = &meye_fops, | ||
1727 | .ioctl_ops = &meye_ioctl_ops, | ||
1728 | .release = video_device_release, | ||
1729 | .minor = -1, | ||
1730 | }; | ||
1731 | |||
1728 | #ifdef CONFIG_PM | 1732 | #ifdef CONFIG_PM |
1729 | static int meye_suspend(struct pci_dev *pdev, pm_message_t state) | 1733 | static int meye_suspend(struct pci_dev *pdev, pm_message_t state) |
1730 | { | 1734 | { |