aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/dsbr100.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/radio/dsbr100.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/radio/dsbr100.c')
-rw-r--r--drivers/media/radio/dsbr100.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c
index 97c6853ad1d3..08bf5e8031da 100644
--- a/drivers/media/radio/dsbr100.c
+++ b/drivers/media/radio/dsbr100.c
@@ -445,14 +445,7 @@ static const struct file_operations usb_dsbr100_fops = {
445 .llseek = no_llseek, 445 .llseek = no_llseek,
446}; 446};
447 447
448/* V4L2 interface */ 448static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = {
449static struct video_device dsbr100_videodev_template =
450{
451 .owner = THIS_MODULE,
452 .name = "D-Link DSB-R 100",
453 .type = VID_TYPE_TUNER,
454 .fops = &usb_dsbr100_fops,
455 .release = video_device_release,
456 .vidioc_querycap = vidioc_querycap, 449 .vidioc_querycap = vidioc_querycap,
457 .vidioc_g_tuner = vidioc_g_tuner, 450 .vidioc_g_tuner = vidioc_g_tuner,
458 .vidioc_s_tuner = vidioc_s_tuner, 451 .vidioc_s_tuner = vidioc_s_tuner,
@@ -467,6 +460,16 @@ static struct video_device dsbr100_videodev_template =
467 .vidioc_s_input = vidioc_s_input, 460 .vidioc_s_input = vidioc_s_input,
468}; 461};
469 462
463/* V4L2 interface */
464static struct video_device dsbr100_videodev_template = {
465 .owner = THIS_MODULE,
466 .name = "D-Link DSB-R 100",
467 .type = VID_TYPE_TUNER,
468 .fops = &usb_dsbr100_fops,
469 .ioctl_ops = &usb_dsbr100_ioctl_ops,
470 .release = video_device_release,
471};
472
470/* check if the device is present and register with v4l and 473/* check if the device is present and register with v4l and
471usb if it is */ 474usb if it is */
472static int usb_dsbr100_probe(struct usb_interface *intf, 475static int usb_dsbr100_probe(struct usb_interface *intf,