aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/vivi.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/vivi.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/vivi.c')
-rw-r--r--drivers/media/video/vivi.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index e4b3a006c71e..639210e52647 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -1066,13 +1066,7 @@ static const struct file_operations vivi_fops = {
1066 .llseek = no_llseek, 1066 .llseek = no_llseek,
1067}; 1067};
1068 1068
1069static struct video_device vivi_template = { 1069static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
1070 .name = "vivi",
1071 .type = VID_TYPE_CAPTURE,
1072 .fops = &vivi_fops,
1073 .minor = -1,
1074 .release = video_device_release,
1075
1076 .vidioc_querycap = vidioc_querycap, 1070 .vidioc_querycap = vidioc_querycap,
1077 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, 1071 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
1078 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, 1072 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
@@ -1094,6 +1088,16 @@ static struct video_device vivi_template = {
1094#ifdef CONFIG_VIDEO_V4L1_COMPAT 1088#ifdef CONFIG_VIDEO_V4L1_COMPAT
1095 .vidiocgmbuf = vidiocgmbuf, 1089 .vidiocgmbuf = vidiocgmbuf,
1096#endif 1090#endif
1091};
1092
1093static struct video_device vivi_template = {
1094 .name = "vivi",
1095 .type = VID_TYPE_CAPTURE,
1096 .fops = &vivi_fops,
1097 .ioctl_ops = &vivi_ioctl_ops,
1098 .minor = -1,
1099 .release = video_device_release,
1100
1097 .tvnorms = V4L2_STD_525_60, 1101 .tvnorms = V4L2_STD_525_60,
1098 .current_norm = V4L2_STD_NTSC_M, 1102 .current_norm = V4L2_STD_NTSC_M,
1099}; 1103};