]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/radio/radio-gemtek-pci.c
V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
[linux-2.6-omap-h63xx.git] / drivers / media / radio / radio-gemtek-pci.c
index 4db05b2b1b6eb919735591090ca05ff302d238fa..c41b35f3b125ee552739d5325ed1f0be14833ebb 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/pci.h>
 #include <linux/videodev2.h>
 #include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
 #include <linux/errno.h>
 
 #include <linux/version.h>      /* for KERNEL_VERSION MACRO     */
@@ -94,7 +95,6 @@ struct gemtek_pci_card {
 
        u32 iobase;
        u32 length;
-       u16 model;
 
        u32 current_frequency;
        u8  mute;
@@ -369,15 +369,13 @@ static const struct file_operations gemtek_pci_fops = {
        .open           = video_exclusive_open,
        .release        = video_exclusive_release,
        .ioctl          = video_ioctl2,
+#ifdef CONFIG_COMPAT
        .compat_ioctl   = v4l_compat_ioctl32,
+#endif
        .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,
@@ -392,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;
@@ -413,8 +419,6 @@ static int __devinit gemtek_pci_probe( struct pci_dev *pci_dev, const struct pci
                goto err_pci;
        }
 
-       pci_read_config_word( pci_dev, PCI_SUBSYSTEM_ID, &card->model );
-
        pci_set_drvdata( pci_dev, card );
 
        if ( (devradio = kmalloc( sizeof( struct video_device ), GFP_KERNEL )) == NULL ) {