aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-blackbird.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/cx88/cx88-blackbird.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/cx88/cx88-blackbird.c')
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index 4d1a461f329f..55c35482089e 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -1175,12 +1175,7 @@ static const struct file_operations mpeg_fops =
1175 .llseek = no_llseek, 1175 .llseek = no_llseek,
1176}; 1176};
1177 1177
1178static struct video_device cx8802_mpeg_template = 1178static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
1179{
1180 .name = "cx8802",
1181 .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES|VID_TYPE_MPEG_ENCODER,
1182 .fops = &mpeg_fops,
1183 .minor = -1,
1184 .vidioc_querymenu = vidioc_querymenu, 1179 .vidioc_querymenu = vidioc_querymenu,
1185 .vidioc_querycap = vidioc_querycap, 1180 .vidioc_querycap = vidioc_querycap,
1186 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, 1181 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
@@ -1208,6 +1203,15 @@ static struct video_device cx8802_mpeg_template =
1208 .vidioc_g_tuner = vidioc_g_tuner, 1203 .vidioc_g_tuner = vidioc_g_tuner,
1209 .vidioc_s_tuner = vidioc_s_tuner, 1204 .vidioc_s_tuner = vidioc_s_tuner,
1210 .vidioc_s_std = vidioc_s_std, 1205 .vidioc_s_std = vidioc_s_std,
1206};
1207
1208static struct video_device cx8802_mpeg_template = {
1209 .name = "cx8802",
1210 .type = VID_TYPE_CAPTURE | VID_TYPE_TUNER |
1211 VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER,
1212 .fops = &mpeg_fops,
1213 .ioctl_ops = &mpeg_ioctl_ops,
1214 .minor = -1,
1211 .tvnorms = CX88_NORMS, 1215 .tvnorms = CX88_NORMS,
1212 .current_norm = V4L2_STD_NTSC_M, 1216 .current_norm = V4L2_STD_NTSC_M,
1213}; 1217};