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/stk-webcam.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/stk-webcam.c')
-rw-r--r-- | drivers/media/video/stk-webcam.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c index 20028aeb842b..8d5fa95ad95a 100644 --- a/drivers/media/video/stk-webcam.c +++ b/drivers/media/video/stk-webcam.c | |||
@@ -1328,20 +1328,7 @@ static struct file_operations v4l_stk_fops = { | |||
1328 | .llseek = no_llseek | 1328 | .llseek = no_llseek |
1329 | }; | 1329 | }; |
1330 | 1330 | ||
1331 | static void stk_v4l_dev_release(struct video_device *vd) | 1331 | static const struct v4l2_ioctl_ops v4l_stk_ioctl_ops = { |
1332 | { | ||
1333 | } | ||
1334 | |||
1335 | static struct video_device stk_v4l_data = { | ||
1336 | .name = "stkwebcam", | ||
1337 | .type = VFL_TYPE_GRABBER, | ||
1338 | .type2 = VID_TYPE_CAPTURE, | ||
1339 | .minor = -1, | ||
1340 | .tvnorms = V4L2_STD_UNKNOWN, | ||
1341 | .current_norm = V4L2_STD_UNKNOWN, | ||
1342 | .fops = &v4l_stk_fops, | ||
1343 | .release = stk_v4l_dev_release, | ||
1344 | |||
1345 | .vidioc_querycap = stk_vidioc_querycap, | 1332 | .vidioc_querycap = stk_vidioc_querycap, |
1346 | .vidioc_enum_fmt_vid_cap = stk_vidioc_enum_fmt_vid_cap, | 1333 | .vidioc_enum_fmt_vid_cap = stk_vidioc_enum_fmt_vid_cap, |
1347 | .vidioc_try_fmt_vid_cap = stk_vidioc_try_fmt_vid_cap, | 1334 | .vidioc_try_fmt_vid_cap = stk_vidioc_try_fmt_vid_cap, |
@@ -1363,6 +1350,22 @@ static struct video_device stk_v4l_data = { | |||
1363 | .vidioc_g_parm = stk_vidioc_g_parm, | 1350 | .vidioc_g_parm = stk_vidioc_g_parm, |
1364 | }; | 1351 | }; |
1365 | 1352 | ||
1353 | static void stk_v4l_dev_release(struct video_device *vd) | ||
1354 | { | ||
1355 | } | ||
1356 | |||
1357 | static struct video_device stk_v4l_data = { | ||
1358 | .name = "stkwebcam", | ||
1359 | .type = VFL_TYPE_GRABBER, | ||
1360 | .type2 = VID_TYPE_CAPTURE, | ||
1361 | .minor = -1, | ||
1362 | .tvnorms = V4L2_STD_UNKNOWN, | ||
1363 | .current_norm = V4L2_STD_UNKNOWN, | ||
1364 | .fops = &v4l_stk_fops, | ||
1365 | .ioctl_ops = &v4l_stk_ioctl_ops, | ||
1366 | .release = stk_v4l_dev_release, | ||
1367 | }; | ||
1368 | |||
1366 | 1369 | ||
1367 | static int stk_register_video_device(struct stk_camera *dev) | 1370 | static int stk_register_video_device(struct stk_camera *dev) |
1368 | { | 1371 | { |