summaryrefslogtreecommitdiff
path: root/linux/drivers/media/radio/radio-sf16fmr2.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-21 07:57:38 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-07-21 07:57:38 +0200
commitaf41aa918f47e0bc59c5554cabbd05db0917bed4 (patch)
tree0642e01acc7e7377c7895be6e16f379344557af4 /linux/drivers/media/radio/radio-sf16fmr2.c
parentb42ffafbaf363a50a8b7188a53d9c391c7ff7468 (diff)
downloadmediapointer-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-sf16fmr2.c')
-rw-r--r--linux/drivers/media/radio/radio-sf16fmr2.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/linux/drivers/media/radio/radio-sf16fmr2.c b/linux/drivers/media/radio/radio-sf16fmr2.c
index 555b97a6c..01b2516e7 100644
--- a/linux/drivers/media/radio/radio-sf16fmr2.c
+++ b/linux/drivers/media/radio/radio-sf16fmr2.c
@@ -412,12 +412,7 @@ static const struct file_operations fmr2_fops = {
.llseek = no_llseek,
};
-static struct video_device fmr2_radio=
-{
- .owner = THIS_MODULE,
- .name = "SF16FMR2 radio",
- . type = VID_TYPE_TUNER,
- .fops = &fmr2_fops,
+static const struct v4l2_ioctl_ops fmr2_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -432,6 +427,14 @@ static struct video_device fmr2_radio=
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device fmr2_radio = {
+ .owner = THIS_MODULE,
+ .name = "SF16FMR2 radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &fmr2_fops,
+ .ioctl_ops = &fmr2_ioctl_ops,
+};
+
static int __init fmr2_init(void)
{
fmr2_unit.port = io;