diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-21 07:57:38 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-21 07:57:38 +0200 |
commit | af41aa918f47e0bc59c5554cabbd05db0917bed4 (patch) | |
tree | 0642e01acc7e7377c7895be6e16f379344557af4 /linux/drivers/media/radio/dsbr100.c | |
parent | b42ffafbaf363a50a8b7188a53d9c391c7ff7468 (diff) | |
download | mediapointer-dvb-s2-af41aa918f47e0bc59c5554cabbd05db0917bed4.tar.gz mediapointer-dvb-s2-af41aa918f47e0bc59c5554cabbd05db0917bed4.tar.bz2 |
videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
From: Hans Verkuil <hverkuil@xs4all.nl>
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>
Diffstat (limited to 'linux/drivers/media/radio/dsbr100.c')
-rw-r--r-- | linux/drivers/media/radio/dsbr100.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/linux/drivers/media/radio/dsbr100.c b/linux/drivers/media/radio/dsbr100.c index 92089e705..00be53110 100644 --- a/linux/drivers/media/radio/dsbr100.c +++ b/linux/drivers/media/radio/dsbr100.c @@ -446,14 +446,7 @@ static const struct file_operations usb_dsbr100_fops = { .llseek = no_llseek, }; -/* V4L2 interface */ -static struct video_device dsbr100_videodev_template = -{ - .owner = THIS_MODULE, - .name = "D-Link DSB-R 100", - .type = VID_TYPE_TUNER, - .fops = &usb_dsbr100_fops, - .release = video_device_release, +static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = { .vidioc_querycap = vidioc_querycap, .vidioc_g_tuner = vidioc_g_tuner, .vidioc_s_tuner = vidioc_s_tuner, @@ -468,6 +461,16 @@ static struct video_device dsbr100_videodev_template = .vidioc_s_input = vidioc_s_input, }; +/* V4L2 interface */ +static struct video_device dsbr100_videodev_template = { + .owner = THIS_MODULE, + .name = "D-Link DSB-R 100", + .type = VID_TYPE_TUNER, + .fops = &usb_dsbr100_fops, + .ioctl_ops = &usb_dsbr100_ioctl_ops, + .release = video_device_release, +}; + /* check if the device is present and register with v4l and usb if it is */ static int usb_dsbr100_probe(struct usb_interface *intf, |