summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-21 02:57:38 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-26 12:54:58 -0300
commita399810ca69d9d4bd30ab8c1678c7439e567f90b (patch)
tree32939ef77bc75c3a224d37cf4e885d7f808741bf /drivers/media
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')
-rw-r--r--drivers/media/radio/dsbr100.c19
-rw-r--r--drivers/media/radio/radio-aimslab.c15
-rw-r--r--drivers/media/radio/radio-aztech.c15
-rw-r--r--drivers/media/radio/radio-cadet.c15
-rw-r--r--drivers/media/radio/radio-gemtek-pci.c14
-rw-r--r--drivers/media/radio/radio-gemtek.c14
-rw-r--r--drivers/media/radio/radio-maestro.c12
-rw-r--r--drivers/media/radio/radio-maxiradio.c16
-rw-r--r--drivers/media/radio/radio-rtrack2.c15
-rw-r--r--drivers/media/radio/radio-sf16fmi.c15
-rw-r--r--drivers/media/radio/radio-sf16fmr2.c15
-rw-r--r--drivers/media/radio/radio-si470x.c21
-rw-r--r--drivers/media/radio/radio-terratec.c15
-rw-r--r--drivers/media/radio/radio-trust.c15
-rw-r--r--drivers/media/radio/radio-typhoon.c15
-rw-r--r--drivers/media/radio/radio-zoltrix.c15
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c26
-rw-r--r--drivers/media/video/cafe_ccic.c25
-rw-r--r--drivers/media/video/cx18/cx18-ioctl.c92
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c20
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c16
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c16
-rw-r--r--drivers/media/video/cx88/cx88-video.c33
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c46
-rw-r--r--drivers/media/video/gspca/gspca.c16
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c130
-rw-r--r--drivers/media/video/meye.c18
-rw-r--r--drivers/media/video/s2255drv.c16
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c22
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c61
-rw-r--r--drivers/media/video/soc_camera.c56
-rw-r--r--drivers/media/video/stk-webcam.c31
-rw-r--r--drivers/media/video/usbvision/usbvision-video.c38
-rw-r--r--drivers/media/video/v4l2-ioctl.c418
-rw-r--r--drivers/media/video/vivi.c18
-rw-r--r--drivers/media/video/zr364xx.c19
36 files changed, 754 insertions, 609 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 = {
.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,
@@ -467,6 +460,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,
diff --git a/drivers/media/radio/radio-aimslab.c b/drivers/media/radio/radio-aimslab.c
index ec8d64704dd0..be9bd7adaf61 100644
--- a/drivers/media/radio/radio-aimslab.c
+++ b/drivers/media/radio/radio-aimslab.c
@@ -389,12 +389,7 @@ static const struct file_operations rtrack_fops = {
.llseek = no_llseek,
};
-static struct video_device rtrack_radio=
-{
- .owner = THIS_MODULE,
- .name = "RadioTrack radio",
- .type = VID_TYPE_TUNER,
- .fops = &rtrack_fops,
+static const struct v4l2_ioctl_ops rtrack_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -409,6 +404,14 @@ static struct video_device rtrack_radio=
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device rtrack_radio = {
+ .owner = THIS_MODULE,
+ .name = "RadioTrack radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &rtrack_fops,
+ .ioctl_ops = &rtrack_ioctl_ops,
+};
+
static int __init rtrack_init(void)
{
if(io==-1)
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c
index 639164a974a1..04c738b62d06 100644
--- a/drivers/media/radio/radio-aztech.c
+++ b/drivers/media/radio/radio-aztech.c
@@ -353,12 +353,7 @@ static const struct file_operations aztech_fops = {
.llseek = no_llseek,
};
-static struct video_device aztech_radio=
-{
- .owner = THIS_MODULE,
- .name = "Aztech radio",
- .type = VID_TYPE_TUNER,
- .fops = &aztech_fops,
+static const struct v4l2_ioctl_ops aztech_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -373,6 +368,14 @@ static struct video_device aztech_radio=
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device aztech_radio = {
+ .owner = THIS_MODULE,
+ .name = "Aztech radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &aztech_fops,
+ .ioctl_ops = &aztech_ioctl_ops,
+};
+
module_param_named(debug,aztech_radio.debug, int, 0644);
MODULE_PARM_DESC(debug,"activates debug info");
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
index 484ea87d7fba..36b850fc14b4 100644
--- a/drivers/media/radio/radio-cadet.c
+++ b/drivers/media/radio/radio-cadet.c
@@ -570,12 +570,7 @@ static const struct file_operations cadet_fops = {
.llseek = no_llseek,
};
-static struct video_device cadet_radio=
-{
- .owner = THIS_MODULE,
- .name = "Cadet radio",
- .type = VID_TYPE_TUNER,
- .fops = &cadet_fops,
+static const struct v4l2_ioctl_ops cadet_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -590,6 +585,14 @@ static struct video_device cadet_radio=
.vidioc_s_input = vidioc_s_input,
};
+static struct video_device cadet_radio = {
+ .owner = THIS_MODULE,
+ .name = "Cadet radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &cadet_fops,
+ .ioctl_ops = &cadet_ioctl_ops,
+};
+
#ifdef CONFIG_PNP
static struct pnp_device_id cadet_pnp_devices[] = {
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c
index 2b834b95f3e7..c41b35f3b125 100644
--- a/drivers/media/radio/radio-gemtek-pci.c
+++ b/drivers/media/radio/radio-gemtek-pci.c
@@ -375,11 +375,7 @@ static const struct file_operations gemtek_pci_fops = {
.llseek = no_llseek,
};
-static struct video_device vdev_template = {
- .owner = THIS_MODULE,
- .name = "Gemtek PCI Radio",
- .type = VID_TYPE_TUNER,
- .fops = &gemtek_pci_fops,
+static const struct v4l2_ioctl_ops gemtek_pci_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -394,6 +390,14 @@ static struct video_device vdev_template = {
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device vdev_template = {
+ .owner = THIS_MODULE,
+ .name = "Gemtek PCI Radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &gemtek_pci_fops,
+ .ioctl_ops = &gemtek_pci_ioctl_ops,
+};
+
static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci_device_id *pci_id )
{
struct gemtek_pci_card *card;
diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c
index 4740bacc2f88..f82b59f35e33 100644
--- a/drivers/media/radio/radio-gemtek.c
+++ b/drivers/media/radio/radio-gemtek.c
@@ -553,11 +553,7 @@ static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
return 0;
}
-static struct video_device gemtek_radio = {
- .owner = THIS_MODULE,
- .name = "GemTek Radio card",
- .type = VID_TYPE_TUNER,
- .fops = &gemtek_fops,
+static const struct v4l2_ioctl_ops gemtek_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -572,6 +568,14 @@ static struct video_device gemtek_radio = {
.vidioc_s_ctrl = vidioc_s_ctrl
};
+static struct video_device gemtek_radio = {
+ .owner = THIS_MODULE,
+ .name = "GemTek Radio card",
+ .type = VID_TYPE_TUNER,
+ .fops = &gemtek_fops,
+ .ioctl_ops = &gemtek_ioctl_ops,
+};
+
/*
* Initialization / cleanup related stuff.
*/
diff --git a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c
index 040a73fac694..d074a8c90674 100644
--- a/drivers/media/radio/radio-maestro.c
+++ b/drivers/media/radio/radio-maestro.c
@@ -355,10 +355,7 @@ static u16 __devinit radio_power_on(struct radio_device *dev)
return (ofreq == radio_bits_get(dev));
}
-static struct video_device maestro_radio = {
- .name = "Maestro radio",
- .type = VID_TYPE_TUNER,
- .fops = &maestro_fops,
+static const struct v4l2_ioctl_ops maestro_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -373,6 +370,13 @@ static struct video_device maestro_radio = {
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device maestro_radio = {
+ .name = "Maestro radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &maestro_fops,
+ .ioctl_ops = &maestro_ioctl_ops,
+};
+
static int __devinit maestro_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c
index 9e824a7d5cc4..780516daebba 100644
--- a/drivers/media/radio/radio-maxiradio.c
+++ b/drivers/media/radio/radio-maxiradio.c
@@ -374,13 +374,7 @@ static int vidioc_s_ctrl (struct file *file, void *priv,
return -EINVAL;
}
-static struct video_device maxiradio_radio =
-{
- .owner = THIS_MODULE,
- .name = "Maxi Radio FM2000 radio",
- .type = VID_TYPE_TUNER,
- .fops = &maxiradio_fops,
-
+static const struct v4l2_ioctl_ops maxiradio_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -395,6 +389,14 @@ static struct video_device maxiradio_radio =
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device maxiradio_radio = {
+ .owner = THIS_MODULE,
+ .name = "Maxi Radio FM2000 radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &maxiradio_fops,
+ .ioctl_ops = &maxiradio_ioctl_ops,
+};
+
static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
if(!request_region(pci_resource_start(pdev, 0),
diff --git a/drivers/media/radio/radio-rtrack2.c b/drivers/media/radio/radio-rtrack2.c
index c3fb270f211b..045ae9d1067c 100644
--- a/drivers/media/radio/radio-rtrack2.c
+++ b/drivers/media/radio/radio-rtrack2.c
@@ -295,12 +295,7 @@ static const struct file_operations rtrack2_fops = {
.llseek = no_llseek,
};
-static struct video_device rtrack2_radio=
-{
- .owner = THIS_MODULE,
- .name = "RadioTrack II radio",
- .type = VID_TYPE_TUNER,
- .fops = &rtrack2_fops,
+static const struct v4l2_ioctl_ops rtrack2_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -315,6 +310,14 @@ static struct video_device rtrack2_radio=
.vidioc_s_input = vidioc_s_input,
};
+static struct video_device rtrack2_radio = {
+ .owner = THIS_MODULE,
+ .name = "RadioTrack II radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &rtrack2_fops,
+ .ioctl_ops = &rtrack2_ioctl_ops,
+};
+
static int __init rtrack2_init(void)
{
if(io==-1)
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c
index bb8b1c9107b1..75b68a024541 100644
--- a/drivers/media/radio/radio-sf16fmi.c
+++ b/drivers/media/radio/radio-sf16fmi.c
@@ -295,12 +295,7 @@ static const struct file_operations fmi_fops = {
.llseek = no_llseek,
};
-static struct video_device fmi_radio=
-{
- .owner = THIS_MODULE,
- .name = "SF16FMx radio",
- .type = VID_TYPE_TUNER,
- .fops = &fmi_fops,
+static const struct v4l2_ioctl_ops fmi_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -315,6 +310,14 @@ static struct video_device fmi_radio=
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device fmi_radio = {
+ .owner = THIS_MODULE,
+ .name = "SF16FMx radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &fmi_fops,
+ .ioctl_ops = &fmi_ioctl_ops,
+};
+
/* ladis: this is my card. does any other types exist? */
static struct isapnp_device_id id_table[] __devinitdata = {
{ ISAPNP_ANY_ID, ISAPNP_ANY_ID,
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index 9fa025b704cb..5ffddce80011 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -411,12 +411,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,
@@ -431,6 +426,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;
diff --git a/drivers/media/radio/radio-si470x.c b/drivers/media/radio/radio-si470x.c
index 333612180176..b829c67ecf0c 100644
--- a/drivers/media/radio/radio-si470x.c
+++ b/drivers/media/radio/radio-si470x.c
@@ -1586,15 +1586,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,
@@ -1608,6 +1600,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,
};
diff --git a/drivers/media/radio/radio-terratec.c b/drivers/media/radio/radio-terratec.c
index a9914dbcf493..3a67471f999c 100644
--- a/drivers/media/radio/radio-terratec.c
+++ b/drivers/media/radio/radio-terratec.c
@@ -367,12 +367,7 @@ static const struct file_operations terratec_fops = {
.llseek = no_llseek,
};
-static struct video_device terratec_radio=
-{
- .owner = THIS_MODULE,
- .name = "TerraTec ActiveRadio",
- .type = VID_TYPE_TUNER,
- .fops = &terratec_fops,
+static const struct v4l2_ioctl_ops terratec_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -387,6 +382,14 @@ static struct video_device terratec_radio=
.vidioc_s_input = vidioc_s_input,
};
+static struct video_device terratec_radio = {
+ .owner = THIS_MODULE,
+ .name = "TerraTec ActiveRadio",
+ .type = VID_TYPE_TUNER,
+ .fops = &terratec_fops,
+ .ioctl_ops = &terratec_ioctl_ops,
+};
+
static int __init terratec_init(void)
{
if(io==-1)
diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c
index 560c49481a2d..e33400180915 100644
--- a/drivers/media/radio/radio-trust.c
+++ b/drivers/media/radio/radio-trust.c
@@ -347,12 +347,7 @@ static const struct file_operations trust_fops = {
.llseek = no_llseek,
};
-static struct video_device trust_radio=
-{
- .owner = THIS_MODULE,
- .name = "Trust FM Radio",
- .type = VID_TYPE_TUNER,
- .fops = &trust_fops,
+static const struct v4l2_ioctl_ops trust_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -367,6 +362,14 @@ static struct video_device trust_radio=
.vidioc_s_input = vidioc_s_input,
};
+static struct video_device trust_radio = {
+ .owner = THIS_MODULE,
+ .name = "Trust FM Radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &trust_fops,
+ .ioctl_ops = &trust_ioctl_ops,
+};
+
static int __init trust_init(void)
{
if(io == -1) {
diff --git a/drivers/media/radio/radio-typhoon.c b/drivers/media/radio/radio-typhoon.c
index 023d6f3c751c..48b5d2bc6276 100644
--- a/drivers/media/radio/radio-typhoon.c
+++ b/drivers/media/radio/radio-typhoon.c
@@ -345,12 +345,7 @@ static const struct file_operations typhoon_fops = {
.llseek = no_llseek,
};
-static struct video_device typhoon_radio =
-{
- .owner = THIS_MODULE,
- .name = "Typhoon Radio",
- .type = VID_TYPE_TUNER,
- .fops = &typhoon_fops,
+static const struct v4l2_ioctl_ops typhoon_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -365,6 +360,14 @@ static struct video_device typhoon_radio =
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device typhoon_radio = {
+ .owner = THIS_MODULE,
+ .name = "Typhoon Radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &typhoon_fops,
+ .ioctl_ops = &typhoon_ioctl_ops,
+};
+
#ifdef CONFIG_RADIO_TYPHOON_PROC_FS
static int typhoon_proc_show(struct seq_file *m, void *v)
diff --git a/drivers/media/radio/radio-zoltrix.c b/drivers/media/radio/radio-zoltrix.c
index cf0355bb6ef7..c60344326cd6 100644
--- a/drivers/media/radio/radio-zoltrix.c
+++ b/drivers/media/radio/radio-zoltrix.c
@@ -408,12 +408,7 @@ static const struct file_operations zoltrix_fops =
.llseek = no_llseek,
};
-static struct video_device zoltrix_radio =
-{
- .owner = THIS_MODULE,
- .name = "Zoltrix Radio Plus",
- .type = VID_TYPE_TUNER,
- .fops = &zoltrix_fops,
+static const struct v4l2_ioctl_ops zoltrix_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
.vidioc_g_tuner = vidioc_g_tuner,
.vidioc_s_tuner = vidioc_s_tuner,
@@ -428,6 +423,14 @@ static struct video_device zoltrix_radio =
.vidioc_s_ctrl = vidioc_s_ctrl,
};
+static struct video_device zoltrix_radio = {
+ .owner = THIS_MODULE,
+ .name = "Zoltrix Radio Plus",
+ .type = VID_TYPE_TUNER,
+ .fops = &zoltrix_fops,
+ .ioctl_ops = &zoltrix_ioctl_ops,
+};
+
static int __init zoltrix_init(void)
{
if (io == -1) {
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 33c72055447d..dfa399da587d 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -3358,10 +3358,7 @@ static const struct file_operations bttv_fops =
.poll = bttv_poll,
};
-static struct video_device bttv_video_template =
-{
- .fops = &bttv_fops,
- .minor = -1,
+static const struct v4l2_ioctl_ops bttv_ioctl_ops = {
.vidioc_querycap = bttv_querycap,
.vidioc_enum_fmt_vid_cap = bttv_enum_fmt_vid_cap,
.vidioc_g_fmt_vid_cap = bttv_g_fmt_vid_cap,
@@ -3412,8 +3409,14 @@ static struct video_device bttv_video_template =
.vidioc_g_register = bttv_g_register,
.vidioc_s_register = bttv_s_register,
#endif
- .tvnorms = BTTV_NORMS,
- .current_norm = V4L2_STD_PAL,
+};
+
+static struct video_device bttv_video_template = {
+ .fops = &bttv_fops,
+ .minor = -1,
+ .ioctl_ops = &bttv_ioctl_ops,
+ .tvnorms = BTTV_NORMS,
+ .current_norm = V4L2_STD_PAL,
};
/* ----------------------------------------------------------------------- */
@@ -3636,10 +3639,7 @@ static const struct file_operations radio_fops =
.poll = radio_poll,
};
-static struct video_device radio_template =
-{
- .fops = &radio_fops,
- .minor = -1,
+static const struct v4l2_ioctl_ops radio_ioctl_ops = {
.vidioc_querycap = radio_querycap,
.vidioc_g_tuner = radio_g_tuner,
.vidioc_enum_input = radio_enum_input,
@@ -3656,6 +3656,12 @@ static struct video_device radio_template =
.vidioc_s_frequency = bttv_s_frequency,
};
+static struct video_device radio_template = {
+ .fops = &radio_fops,
+ .minor = -1,
+ .ioctl_ops = &radio_ioctl_ops,
+};
+
/* ----------------------------------------------------------------------- */
/* some debug code */
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index 302c57f151c2..4bbea458d0c0 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -1769,17 +1769,7 @@ static const struct file_operations cafe_v4l_fops = {
.llseek = no_llseek,
};
-static struct video_device cafe_v4l_template = {
- .name = "cafe",
- .type = VFL_TYPE_GRABBER,
- .type2 = VID_TYPE_CAPTURE,
- .minor = -1, /* Get one dynamically */
- .tvnorms = V4L2_STD_NTSC_M,
- .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
-
- .fops = &cafe_v4l_fops,
- .release = cafe_v4l_dev_release,
-
+static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = {
.vidioc_querycap = cafe_vidioc_querycap,
.vidioc_enum_fmt_vid_cap = cafe_vidioc_enum_fmt_vid_cap,
.vidioc_try_fmt_vid_cap = cafe_vidioc_try_fmt_vid_cap,
@@ -1802,6 +1792,19 @@ static struct video_device cafe_v4l_template = {
.vidioc_s_parm = cafe_vidioc_s_parm,
};
+static struct video_device cafe_v4l_template = {
+ .name = "cafe",
+ .type = VFL_TYPE_GRABBER,
+ .type2 = VID_TYPE_CAPTURE,
+ .minor = -1, /* Get one dynamically */
+ .tvnorms = V4L2_STD_NTSC_M,
+ .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
+
+ .fops = &cafe_v4l_fops,
+ .ioctl_ops = &cafe_v4l_ioctl_ops,
+ .release = cafe_v4l_dev_release,
+};
+
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c
index 0d74e59e503e..a7f839631d6a 100644
--- a/drivers/media/video/cx18/cx18-ioctl.c
+++ b/drivers/media/video/cx18/cx18-ioctl.c
@@ -787,50 +787,54 @@ int cx18_v4l2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
return res;
}
-void cx18_set_funcs(struct video_device *vdev)
-{
- vdev->vidioc_querycap = cx18_querycap;
- vdev->vidioc_g_priority = cx18_g_priority;
- vdev->vidioc_s_priority = cx18_s_priority;
- vdev->vidioc_s_audio = cx18_s_audio;
- vdev->vidioc_g_audio = cx18_g_audio;
- vdev->vidioc_enumaudio = cx18_enumaudio;
- vdev->vidioc_enum_input = cx18_enum_input;
- vdev->vidioc_cropcap = cx18_cropcap;
- vdev->vidioc_s_crop = cx18_s_crop;
- vdev->vidioc_g_crop = cx18_g_crop;
- vdev->vidioc_g_input = cx18_g_input;
- vdev->vidioc_s_input = cx18_s_input;
- vdev->vidioc_g_frequency = cx18_g_frequency;
- vdev->vidioc_s_frequency = cx18_s_frequency;
- vdev->vidioc_s_tuner = cx18_s_tuner;
- vdev->vidioc_g_tuner = cx18_g_tuner;
- vdev->vidioc_g_enc_index = cx18_g_enc_index;
- vdev->vidioc_g_std = cx18_g_std;
- vdev->vidioc_s_std = cx18_s_std;
- vdev->vidioc_log_status = cx18_log_status;
- vdev->vidioc_enum_fmt_vid_cap = cx18_enum_fmt_vid_cap;
- vdev->vidioc_encoder_cmd = cx18_encoder_cmd;
- vdev->vidioc_try_encoder_cmd = cx18_try_encoder_cmd;
- vdev->vidioc_g_fmt_vid_cap = cx18_g_fmt_vid_cap;
- vdev->vidioc_g_fmt_vbi_cap = cx18_g_fmt_vbi_cap;
- vdev->vidioc_g_fmt_sliced_vbi_cap = cx18_g_fmt_sliced_vbi_cap;
- vdev->vidioc_s_fmt_vid_cap = cx18_s_fmt_vid_cap;
- vdev->vidioc_s_fmt_vbi_cap = cx18_s_fmt_vbi_cap;
- vdev->vidioc_s_fmt_sliced_vbi_cap = cx18_s_fmt_sliced_vbi_cap;
- vdev->vidioc_try_fmt_vid_cap = cx18_try_fmt_vid_cap;
- vdev->vidioc_try_fmt_vbi_cap = cx18_try_fmt_vbi_cap;
- vdev->vidioc_try_fmt_sliced_vbi_cap = cx18_try_fmt_sliced_vbi_cap;
- vdev->vidioc_g_sliced_vbi_cap = cx18_g_sliced_vbi_cap;
- vdev->vidioc_g_chip_ident = cx18_g_chip_ident;
+static const struct v4l2_ioctl_ops cx18_ioctl_ops = {
+ .vidioc_querycap = cx18_querycap,
+ .vidioc_g_priority = cx18_g_priority,
+ .vidioc_s_priority = cx18_s_priority,
+ .vidioc_s_audio = cx18_s_audio,
+ .vidioc_g_audio = cx18_g_audio,
+ .vidioc_enumaudio = cx18_enumaudio,
+ .vidioc_enum_input = cx18_enum_input,
+ .vidioc_cropcap = cx18_cropcap,
+ .vidioc_s_crop = cx18_s_crop,
+ .vidioc_g_crop = cx18_g_crop,
+ .vidioc_g_input = cx18_g_input,
+ .vidioc_s_input = cx18_s_input,
+ .vidioc_g_frequency = cx18_g_frequency,
+ .vidioc_s_frequency = cx18_s_frequency,
+ .vidioc_s_tuner = cx18_s_tuner,
+ .vidioc_g_tuner = cx18_g_tuner,
+ .vidioc_g_enc_index = cx18_g_enc_index,
+ .vidioc_g_std = cx18_g_std,
+ .vidioc_s_std = cx18_s_std,
+ .vidioc_log_status = cx18_log_status,
+ .vidioc_enum_fmt_vid_cap = cx18_enum_fmt_vid_cap,
+ .vidioc_encoder_cmd = cx18_encoder_cmd,
+ .vidioc_try_encoder_cmd = cx18_try_encoder_cmd,
+ .vidioc_g_fmt_vid_cap = cx18_g_fmt_vid_cap,
+ .vidioc_g_fmt_vbi_cap = cx18_g_fmt_vbi_cap,
+ .vidioc_g_fmt_sliced_vbi_cap = cx18_g_fmt_sliced_vbi_cap,
+ .vidioc_s_fmt_vid_cap = cx18_s_fmt_vid_cap,
+ .vidioc_s_fmt_vbi_cap = cx18_s_fmt_vbi_cap,
+ .vidioc_s_fmt_sliced_vbi_cap = cx18_s_fmt_sliced_vbi_cap,
+ .vidioc