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/zr364xx.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/zr364xx.c')
-rw-r--r-- | drivers/media/video/zr364xx.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index ea5265c22983..617ed2856b22 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c | |||
@@ -762,14 +762,7 @@ static const struct file_operations zr364xx_fops = { | |||
762 | .llseek = no_llseek, | 762 | .llseek = no_llseek, |
763 | }; | 763 | }; |
764 | 764 | ||
765 | static struct video_device zr364xx_template = { | 765 | static const struct v4l2_ioctl_ops zr364xx_ioctl_ops = { |
766 | .owner = THIS_MODULE, | ||
767 | .name = DRIVER_DESC, | ||
768 | .type = VID_TYPE_CAPTURE, | ||
769 | .fops = &zr364xx_fops, | ||
770 | .release = video_device_release, | ||
771 | .minor = -1, | ||
772 | |||
773 | .vidioc_querycap = zr364xx_vidioc_querycap, | 766 | .vidioc_querycap = zr364xx_vidioc_querycap, |
774 | .vidioc_enum_fmt_vid_cap = zr364xx_vidioc_enum_fmt_vid_cap, | 767 | .vidioc_enum_fmt_vid_cap = zr364xx_vidioc_enum_fmt_vid_cap, |
775 | .vidioc_try_fmt_vid_cap = zr364xx_vidioc_try_fmt_vid_cap, | 768 | .vidioc_try_fmt_vid_cap = zr364xx_vidioc_try_fmt_vid_cap, |
@@ -785,6 +778,16 @@ static struct video_device zr364xx_template = { | |||
785 | .vidioc_s_ctrl = zr364xx_vidioc_s_ctrl, | 778 | .vidioc_s_ctrl = zr364xx_vidioc_s_ctrl, |
786 | }; | 779 | }; |
787 | 780 | ||
781 | static struct video_device zr364xx_template = { | ||
782 | .owner = THIS_MODULE, | ||
783 | .name = DRIVER_DESC, | ||
784 | .type = VID_TYPE_CAPTURE, | ||
785 | .fops = &zr364xx_fops, | ||
786 | .ioctl_ops = &zr364xx_ioctl_ops, | ||
787 | .release = video_device_release, | ||
788 | .minor = -1, | ||
789 | }; | ||
790 | |||
788 | 791 | ||
789 | 792 | ||
790 | /*******************/ | 793 | /*******************/ |