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/radio-si470x.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/radio-si470x.c')
-rw-r--r-- | linux/drivers/media/radio/radio-si470x.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c index 110989cac..cbded7f86 100644 --- a/linux/drivers/media/radio/radio-si470x.c +++ b/linux/drivers/media/radio/radio-si470x.c @@ -1591,15 +1591,7 @@ done: return retval; } - -/* - * si470x_viddev_tamples - video device interface - */ -static struct video_device si470x_viddev_template = { - .fops = &si470x_fops, - .name = DRIVER_NAME, - .type = VID_TYPE_TUNER, - .release = video_device_release, +static const struct v4l2_ioctl_ops si470x_ioctl_ops = { .vidioc_querycap = si470x_vidioc_querycap, .vidioc_g_input = si470x_vidioc_g_input, .vidioc_s_input = si470x_vidioc_s_input, @@ -1613,6 +1605,17 @@ static struct video_device si470x_viddev_template = { .vidioc_g_frequency = si470x_vidioc_g_frequency, .vidioc_s_frequency = si470x_vidioc_s_frequency, .vidioc_s_hw_freq_seek = si470x_vidioc_s_hw_freq_seek, +}; + +/* + * si470x_viddev_tamples - video device interface + */ +static struct video_device si470x_viddev_template = { + .fops = &si470x_fops, + .ioctl_ops = &si470x_ioctl_ops, + .name = DRIVER_NAME, + .type = VID_TYPE_TUNER, + .release = video_device_release, .owner = THIS_MODULE, }; |