aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s2255drv.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-21 01:57:38 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 11:54:58 -0400
commita399810ca69d9d4bd30ab8c1678c7439e567f90b (patch)
tree32939ef77bc75c3a224d37cf4e885d7f808741bf /drivers/media/video/s2255drv.c
parentb654fcdc0ea3b6e5724c9873ae062bdfe7f28efe (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/s2255drv.c')
-rw-r--r--drivers/media/video/s2255drv.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
index eb81915935b1..2428d441fe15 100644
--- a/drivers/media/video/s2255drv.c
+++ b/drivers/media/video/s2255drv.c
@@ -1659,12 +1659,7 @@ static const struct file_operations s2255_fops_v4l = {
1659 .llseek = no_llseek, 1659 .llseek = no_llseek,
1660}; 1660};
1661 1661
1662static struct video_device template = { 1662static const struct v4l2_ioctl_ops s2255_ioctl_ops = {
1663 .name = "s2255v",
1664 .type = VID_TYPE_CAPTURE,
1665 .fops = &s2255_fops_v4l,
1666 .minor = -1,
1667 .release = video_device_release,
1668 .vidioc_querycap = vidioc_querycap, 1663 .vidioc_querycap = vidioc_querycap,
1669 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, 1664 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
1670 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, 1665 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
@@ -1686,6 +1681,15 @@ static struct video_device template = {
1686#ifdef CONFIG_VIDEO_V4L1_COMPAT 1681#ifdef CONFIG_VIDEO_V4L1_COMPAT
1687 .vidiocgmbuf = vidioc_cgmbuf, 1682 .vidiocgmbuf = vidioc_cgmbuf,
1688#endif 1683#endif
1684};
1685
1686static struct video_device template = {
1687 .name = "s2255v",
1688 .type = VID_TYPE_CAPTURE,
1689 .fops = &s2255_fops_v4l,
1690 .ioctl_ops = &s2255_ioctl_ops,
1691 .minor = -1,
1692 .release = video_device_release,
1689 .tvnorms = S2255_NORMS, 1693 .tvnorms = S2255_NORMS,
1690 .current_norm = V4L2_STD_NTSC_M, 1694 .current_norm = V4L2_STD_NTSC_M,
1691}; 1695};