]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (8523): v4l2-dev: remove unused type and type2 field from video_device
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 26 Jul 2008 11:26:43 +0000 (08:26 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 27 Jul 2008 14:07:10 +0000 (11:07 -0300)
The type and type2 fields were unused and so could be removed.
Instead add a vfl_type field that contains the type of the video
device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
64 files changed:
drivers/media/common/saa7146_fops.c
drivers/media/radio/dsbr100.c
drivers/media/radio/miropcm20-radio.c
drivers/media/radio/radio-aimslab.c
drivers/media/radio/radio-aztech.c
drivers/media/radio/radio-cadet.c
drivers/media/radio/radio-gemtek-pci.c
drivers/media/radio/radio-gemtek.c
drivers/media/radio/radio-maestro.c
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-rtrack2.c
drivers/media/radio/radio-sf16fmi.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/radio-si470x.c
drivers/media/radio/radio-terratec.c
drivers/media/radio/radio-trust.c
drivers/media/radio/radio-typhoon.c
drivers/media/radio/radio-zoltrix.c
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bw-qcam.c
drivers/media/video/c-qcam.c
drivers/media/video/cafe_ccic.c
drivers/media/video/cpia.c
drivers/media/video/cpia2/cpia2_v4l.c
drivers/media/video/cx18/cx18-streams.c
drivers/media/video/cx23885/cx23885-417.c
drivers/media/video/cx23885/cx23885-video.c
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/et61x251/et61x251_core.c
drivers/media/video/gspca/gspca.c
drivers/media/video/ivtv/ivtv-streams.c
drivers/media/video/meye.c
drivers/media/video/ov511.c
drivers/media/video/pms.c
drivers/media/video/pvrusb2/pvrusb2-v4l2.c
drivers/media/video/pwc/pwc-if.c
drivers/media/video/s2255drv.c
drivers/media/video/saa5246a.c
drivers/media/video/saa5249.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-empress.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/se401.c
drivers/media/video/sn9c102/sn9c102_core.c
drivers/media/video/soc_camera.c
drivers/media/video/stk-webcam.c
drivers/media/video/stradis.c
drivers/media/video/stv680.c
drivers/media/video/usbvideo/usbvideo.c
drivers/media/video/usbvideo/vicam.c
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/uvc/uvc_driver.c
drivers/media/video/v4l2-dev.c
drivers/media/video/vino.c
drivers/media/video/vivi.c
drivers/media/video/w9966.c
drivers/media/video/w9968cf.c
drivers/media/video/zc0301/zc0301_core.c
drivers/media/video/zoran_driver.c
drivers/media/video/zr364xx.c
include/media/v4l2-dev.h
sound/i2c/other/tea575x-tuner.c

index 171afe7da6b60e9d66dd78259d987aada6eb0dfa..cf6a817d50594a21f76721f1c386b1b2d798418c 100644 (file)
@@ -563,7 +563,7 @@ int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev
 
        DEB_EE(("dev:%p\n",dev));
 
-       if( VFL_TYPE_GRABBER == (*vid)->type ) {
+       if ((*vid)->vfl_type == VFL_TYPE_GRABBER) {
                vv->video_minor = -1;
        } else {
                vv->vbi_minor = -1;
index 0edada6f4b3146947a5b4a138e373da957778c3d..1ed88f3abe61084cc661a188afd829e2f54e0d79 100644 (file)
@@ -463,7 +463,6 @@ static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = {
 /* V4L2 interface */
 static struct video_device dsbr100_videodev_template = {
        .name           = "D-Link DSB-R 100",
-       .type           = VID_TYPE_TUNER,
        .fops           = &usb_dsbr100_fops,
        .ioctl_ops      = &usb_dsbr100_ioctl_ops,
        .release        = video_device_release,
index 594e246dfcffe6a022b238d8b6cf871122dfdb6e..7fd7ee2d32c11dd2214faf73c1c724be2ddfbabd 100644 (file)
@@ -230,7 +230,6 @@ static const struct file_operations pcm20_fops = {
 
 static struct video_device pcm20_radio = {
        .name           = "Miro PCM 20 radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &pcm20_fops,
        .priv           = &pcm20_unit
 };
index 2540df6dc2c86f01d5ad747e278a18a31f5b77cf..eba9209b30240a3212d707da8bb3e79f54d67f9f 100644 (file)
@@ -406,7 +406,6 @@ static const struct v4l2_ioctl_ops rtrack_ioctl_ops = {
 
 static struct video_device rtrack_radio = {
        .name           = "RadioTrack radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &rtrack_fops,
        .ioctl_ops      = &rtrack_ioctl_ops,
 };
index 537f2f4795068daead6dff4b488f5347b9f6ba25..3fe5504428c5b0099fa7aeba0a99bf91c509a4b8 100644 (file)
@@ -370,7 +370,6 @@ static const struct v4l2_ioctl_ops aztech_ioctl_ops = {
 
 static struct video_device aztech_radio = {
        .name               = "Aztech radio",
-       .type               = VID_TYPE_TUNER,
        .fops               = &aztech_fops,
        .ioctl_ops          = &aztech_ioctl_ops,
 };
index 362a279f06801657ca083ca0abf4c33fefb61981..6166e726ed7203908adcd908be14199452c744aa 100644 (file)
@@ -587,7 +587,6 @@ static const struct v4l2_ioctl_ops cadet_ioctl_ops = {
 
 static struct video_device cadet_radio = {
        .name           = "Cadet radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &cadet_fops,
        .ioctl_ops      = &cadet_ioctl_ops,
 };
index b8c515762b49ecd588cba7a1c02eb2c9d085ae28..36e754e3ffb2011cbdba08e88cdfce11cab7ec0f 100644 (file)
@@ -392,7 +392,6 @@ static const struct v4l2_ioctl_ops gemtek_pci_ioctl_ops = {
 
 static struct video_device vdev_template = {
        .name          = "Gemtek PCI Radio",
-       .type          = VID_TYPE_TUNER,
        .fops          = &gemtek_pci_fops,
        .ioctl_ops     = &gemtek_pci_ioctl_ops,
 };
index 45b47c1643eedb691d494bba34df829eb03ff15b..2b1a6221de6d5f2108ff8ad0aaab04e515082002 100644 (file)
@@ -570,7 +570,6 @@ static const struct v4l2_ioctl_ops gemtek_ioctl_ops = {
 
 static struct video_device gemtek_radio = {
        .name                   = "GemTek Radio card",
-       .type                   = VID_TYPE_TUNER,
        .fops                   = &gemtek_fops,
        .ioctl_ops              = &gemtek_ioctl_ops,
 };
index d074a8c90674f3a05fafbaee6c961b8c1724d662..0ada1c697e8a4834690ee2b442dcb87128f694fc 100644 (file)
@@ -372,7 +372,6 @@ static const struct v4l2_ioctl_ops maestro_ioctl_ops = {
 
 static struct video_device maestro_radio = {
        .name           = "Maestro radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &maestro_fops,
        .ioctl_ops      = &maestro_ioctl_ops,
 };
index 1b90996064943b1138cd26bd9450267bf6f84e26..43c75497dc499ea02fdeebabfd0d57568458e896 100644 (file)
@@ -391,7 +391,6 @@ static const struct v4l2_ioctl_ops maxiradio_ioctl_ops = {
 
 static struct video_device maxiradio_radio = {
        .name               = "Maxi Radio FM2000 radio",
-       .type               = VID_TYPE_TUNER,
        .fops               = &maxiradio_fops,
        .ioctl_ops          = &maxiradio_ioctl_ops,
 };
index e065cb16dc5a3d44b7b574dd5dc2a269821c934e..e2dde0807268374f404db090b6c0b412548d0b40 100644 (file)
@@ -312,7 +312,6 @@ static const struct v4l2_ioctl_ops rtrack2_ioctl_ops = {
 
 static struct video_device rtrack2_radio = {
        .name           = "RadioTrack II radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &rtrack2_fops,
        .ioctl_ops      = &rtrack2_ioctl_ops,
 };
index 975f8521848a22a22a48912ac5ce2caa711f2346..bb5d92f104af000177afab5c202652adafc7a0f8 100644 (file)
@@ -312,7 +312,6 @@ static const struct v4l2_ioctl_ops fmi_ioctl_ops = {
 
 static struct video_device fmi_radio = {
        .name           = "SF16FMx radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &fmi_fops,
        .ioctl_ops      = &fmi_ioctl_ops,
 };
index 2786722b4946e241bf791722fdf692aafb5612c8..6290553d24beef56cf55ecfbe55aab32ae0ad620 100644 (file)
@@ -428,7 +428,6 @@ static const struct v4l2_ioctl_ops fmr2_ioctl_ops = {
 
 static struct video_device fmr2_radio = {
        .name           = "SF16FMR2 radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &fmr2_fops,
        .ioctl_ops      = &fmr2_ioctl_ops,
 };
index 3cf78ccdc58f2ce1d596713d5d541aa3452d2100..a4984ff87c9c8328bd7e59b92022adf994d74430 100644 (file)
@@ -1609,7 +1609,6 @@ 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,
 };
 
index b3f669d0691f986f83573429c5127eb92f437056..cefa44fc5aed84a42900591d99ac40a0878012fc 100644 (file)
@@ -384,7 +384,6 @@ static const struct v4l2_ioctl_ops terratec_ioctl_ops = {
 
 static struct video_device terratec_radio = {
        .name           = "TerraTec ActiveRadio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &terratec_fops,
        .ioctl_ops      = &terratec_ioctl_ops,
 };
index 74aefda868e6ae712570d93498aa81c11d5d0525..d70172d23edb431f0460dbecd2a562a740a28e9e 100644 (file)
@@ -364,7 +364,6 @@ static const struct v4l2_ioctl_ops trust_ioctl_ops = {
 
 static struct video_device trust_radio = {
        .name           = "Trust FM Radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &trust_fops,
        .ioctl_ops      = &trust_ioctl_ops,
 };
index 6eb39b7ab75ed1a449cd61c0df478ff7696d6125..f8d62cfea7745d28cdda0c5be81667e4fb571c09 100644 (file)
@@ -362,7 +362,6 @@ static const struct v4l2_ioctl_ops typhoon_ioctl_ops = {
 
 static struct video_device typhoon_radio = {
        .name           = "Typhoon Radio",
-       .type           = VID_TYPE_TUNER,
        .fops           = &typhoon_fops,
        .ioctl_ops      = &typhoon_ioctl_ops,
 };
index 4afcb09a4af3c611f0a7cb00d6487b0afb271c97..9f17a332fa1173b5efa41dd298b84d614d6216e6 100644 (file)
@@ -425,7 +425,6 @@ static const struct v4l2_ioctl_ops zoltrix_ioctl_ops = {
 
 static struct video_device zoltrix_radio = {
        .name           = "Zoltrix Radio Plus",
-       .type           = VID_TYPE_TUNER,
        .fops           = &zoltrix_fops,
        .ioctl_ops      = &zoltrix_ioctl_ops,
 };
index dfa399da587d51fe099783240a88bbeda439003a..85bf31ab8789db097df2f29b0aaf77f8578b86f8 100644 (file)
@@ -4182,8 +4182,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id)
 
 static struct video_device *vdev_init(struct bttv *btv,
                                      const struct video_device *template,
-                                     const char *type_name,
-                                     const int type)
+                                     const char *type_name)
 {
        struct video_device *vfd;
 
@@ -4194,7 +4193,6 @@ static struct video_device *vdev_init(struct bttv *btv,
        vfd->minor   = -1;
        vfd->parent  = &btv->c.pci->dev;
        vfd->release = video_device_release;
-       vfd->type    = type;
        vfd->debug   = bttv_debug;
        snprintf(vfd->name, sizeof(vfd->name), "BT%d%s %s (%s)",
                 btv->id, (btv->id==848 && btv->revision==0x12) ? "A" : "",
@@ -4230,20 +4228,11 @@ static void bttv_unregister_video(struct bttv *btv)
 /* register video4linux devices */
 static int __devinit bttv_register_video(struct bttv *btv)
 {
-       int video_type = VID_TYPE_CAPTURE |
-                        VID_TYPE_TUNER   |
-                        VID_TYPE_CLIPPING|
-                        VID_TYPE_SCALES;
-
-       if (no_overlay <= 0) {
-               bttv_video_template.type |= VID_TYPE_OVERLAY;
-       } else {
+       if (no_overlay > 0)
                printk("bttv: Overlay support disabled.\n");
-       }
 
        /* video */
-       btv->video_dev = vdev_init(btv, &bttv_video_template,
-                                  "video", video_type);
+       btv->video_dev = vdev_init(btv, &bttv_video_template, "video");
 
        if (NULL == btv->video_dev)
                goto err;
@@ -4259,8 +4248,7 @@ static int __devinit bttv_register_video(struct bttv *btv)
        }
 
        /* vbi */
-       btv->vbi_dev = vdev_init(btv, &bttv_video_template,
-                                "vbi", VID_TYPE_TUNER | VID_TYPE_TELETEXT);
+       btv->vbi_dev = vdev_init(btv, &bttv_video_template, "vbi");
 
        if (NULL == btv->vbi_dev)
                goto err;
@@ -4272,8 +4260,7 @@ static int __devinit bttv_register_video(struct bttv *btv)
        if (!btv->has_radio)
                return 0;
        /* radio */
-       btv->radio_dev = vdev_init(btv, &radio_template,
-                                  "radio", VID_TYPE_TUNER);
+       btv->radio_dev = vdev_init(btv, &radio_template, "radio");
        if (NULL == btv->radio_dev)
                goto err;
        if (video_register_device(btv->radio_dev, VFL_TYPE_RADIO,radio_nr)<0)
index ec870c781c021ef5b702e5c5dcf36bac2583fe5e..d3b3268bace8795dcde4e8d6f1e002d61fa24b7f 100644 (file)
@@ -908,7 +908,6 @@ static const struct file_operations qcam_fops = {
 static struct video_device qcam_template=
 {
        .name           = "Connectix Quickcam",
-       .type           = VID_TYPE_CAPTURE,
        .fops           = &qcam_fops,
 };
 
index 62ed8949d46152dcf2b7cf7d973bb2f9b440d955..fe9379b282d36b10e7b3043ab46f1f243a2fa8ed 100644 (file)
@@ -703,7 +703,6 @@ static const struct file_operations qcam_fops = {
 static struct video_device qcam_template=
 {
        .name           = "Colour QuickCam",
-       .type           = VID_TYPE_CAPTURE,
        .fops           = &qcam_fops,
 };
 
index 4bbea458d0c00f896663bd4d006450a8da2a1057..c149b7d712e5a703d5f277ebed607aafe6202202 100644 (file)
@@ -1794,8 +1794,6 @@ static const struct v4l2_ioctl_ops cafe_v4l_ioctl_ops = {
 
 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 */
index 5d2ef48137c407bd8160c51ac7bab7abb493eeb1..dc8cc6115e2f13f1eea59c69d177afd5d051ecdd 100644 (file)
@@ -3800,7 +3800,6 @@ static const struct file_operations cpia_fops = {
 
 static struct video_device cpia_template = {
        .name           = "CPiA Camera",
-       .type           = VID_TYPE_CAPTURE,
        .fops           = &cpia_fops,
 };
 
index 4e45de78df59716c1d8c62002d42d94e1eff7276..515c8b57a60d8772c7b156fb1e0fd11c02f9d2d3 100644 (file)
@@ -1937,9 +1937,6 @@ static const struct file_operations fops_template = {
 static struct video_device cpia2_template = {
        /* I could not find any place for the old .initialize initializer?? */
        .name=          "CPiA2 Camera",
-       .type=          VID_TYPE_CAPTURE,
-       .type2 =        V4L2_CAP_VIDEO_CAPTURE |
-                       V4L2_CAP_STREAMING,
        .minor=         -1,
        .fops=          &fops_template,
        .release=       video_device_release,
index 210a2416b320c1205a6f5ffb0409db79d6c69ca6..0da57f583bf75a90207b6b82bd5b762f95c742c6 100644 (file)
@@ -187,9 +187,6 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
                return -ENOMEM;
        }
 
-       s->v4l2dev->type =
-               VID_TYPE_CAPTURE | VID_TYPE_TUNER | VID_TYPE_TELETEXT |
-               VID_TYPE_CLIPPING | VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER;
        snprintf(s->v4l2dev->name, sizeof(s->v4l2dev->name), "cx18-%d",
                        cx->num);
 
index 9d15d8a353fad4283a4c85ca7ace51c86f9cd95c..8118091568fc62ee711bc88d06c5c193751df4a7 100644 (file)
@@ -1731,10 +1731,6 @@ static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
 
 static struct video_device cx23885_mpeg_template = {
        .name          = "cx23885",
-       .type          = VID_TYPE_CAPTURE |
-                               VID_TYPE_TUNER |
-                               VID_TYPE_SCALES |
-                               VID_TYPE_MPEG_ENCODER,
        .fops          = &mpeg_fops,
        .ioctl_ops     = &mpeg_ioctl_ops,
        .minor         = -1,
index 308caa2085bafbae3fe91588624fc85ae48b6fd6..ad2235dab5b1450c1f958973556bce77faf5febf 100644 (file)
@@ -1472,7 +1472,6 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
 static struct video_device cx23885_vbi_template;
 static struct video_device cx23885_video_template = {
        .name                 = "cx23885-video",
-       .type                 = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES,
        .fops                 = &video_fops,
        .minor                = -1,
        .ioctl_ops            = &video_ioctl_ops,
@@ -1517,7 +1516,6 @@ int cx23885_video_register(struct cx23885_dev *dev)
        memcpy(&cx23885_vbi_template, &cx23885_video_template,
                sizeof(cx23885_vbi_template));
        strcpy(cx23885_vbi_template.name, "cx23885-vbi");
-       cx23885_vbi_template.type = VID_TYPE_TELETEXT|VID_TYPE_TUNER;
 
        dev->tvnorm = cx23885_video_template.current_norm;
 
index 55c35482089e300dd19cd58946c61d4c45744d48..9a1374a38ec75a315463c02e83f5c6ad113b6fb4 100644 (file)
@@ -1207,8 +1207,6 @@ static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
 
 static struct video_device cx8802_mpeg_template = {
        .name                 = "cx8802",
-       .type                 = VID_TYPE_CAPTURE | VID_TYPE_TUNER |
-                               VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER,
        .fops                 = &mpeg_fops,
        .ioctl_ops            = &mpeg_ioctl_ops,
        .minor                = -1,
index 24b403b238d1581f1eaa4de8c274cbcbff689006..ef4d56ea00278bf4183ac932fd7f46edda8b1618 100644 (file)
@@ -1722,7 +1722,6 @@ static struct video_device cx8800_vbi_template;
 
 static struct video_device cx8800_video_template = {
        .name                 = "cx8800-video",
-       .type                 = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES,
        .fops                 = &video_fops,
        .minor                = -1,
        .ioctl_ops            = &video_ioctl_ops,
@@ -1761,7 +1760,6 @@ static const struct v4l2_ioctl_ops radio_ioctl_ops = {
 
 static struct video_device cx8800_radio_template = {
        .name                 = "cx8800-radio",
-       .type                 = VID_TYPE_TUNER,
        .fops                 = &radio_fops,
        .minor                = -1,
        .ioctl_ops            = &radio_ioctl_ops,
@@ -1838,7 +1836,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
        memcpy( &cx8800_vbi_template, &cx8800_video_template,
                sizeof(cx8800_vbi_template) );
        strcpy(cx8800_vbi_template.name,"cx8800-vbi");
-       cx8800_vbi_template.type = VID_TYPE_TELETEXT|VID_TYPE_TUNER;
 
        /* initialize driver struct */
        spin_lock_init(&dev->slock);
index fcfc7413f74c137063295f4212b6485455d7f0b0..49ab0629702e289bb2a8360a00c0703e3d60f694 100644 (file)
@@ -1845,7 +1845,6 @@ static const struct v4l2_ioctl_ops radio_ioctl_ops = {
 
 static struct video_device em28xx_radio_template = {
        .name                 = "em28xx-radio",
-       .type                 = VID_TYPE_TUNER,
        .fops                 = &radio_fops,
        .ioctl_ops            = &radio_ioctl_ops,
        .minor                = -1,
@@ -1891,7 +1890,6 @@ EXPORT_SYMBOL(em28xx_unregister_extension);
 
 static struct video_device *em28xx_vdev_init(struct em28xx *dev,
                                             const struct video_device *template,
-                                            const int type,
                                             const char *type_name)
 {
        struct video_device *vfd;
@@ -1903,7 +1901,6 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev,
        vfd->minor   = -1;
        vfd->parent = &dev->udev->dev;
        vfd->release = video_device_release;
-       vfd->type = type;
        vfd->debug = video_debug;
 
        snprintf(vfd->name, sizeof(vfd->name), "%s %s",
@@ -1981,14 +1978,11 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
        list_add_tail(&dev->devlist, &em28xx_devlist);
 
        /* allocate and fill video video_device struct */
-       dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template,
-                                         VID_TYPE_CAPTURE, "video");
+       dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video");
        if (NULL == dev->vdev) {
                em28xx_errdev("cannot allocate video_device.\n");
                goto fail_unreg;
        }
-       if (dev->tuner_type != TUNER_ABSENT)
-               dev->vdev->type |= VID_TYPE_TUNER;
 
        /* register v4l2 video video_device */
        retval = video_register_device(dev->vdev, VFL_TYPE_GRABBER,
@@ -2000,8 +1994,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
        }
 
        /* Allocate and fill vbi video_device struct */
-       dev->vbi_dev = em28xx_vdev_init(dev, &em28xx_video_template,
-                                         VFL_TYPE_VBI, "vbi");
+       dev->vbi_dev = em28xx_vdev_init(dev, &em28xx_video_template, "vbi");
        /* register v4l2 vbi video_device */
        if (video_register_device(dev->vbi_dev, VFL_TYPE_VBI,
                                        vbi_nr[dev->devno]) < 0) {
@@ -2011,8 +2004,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
        }
 
        if (em28xx_boards[dev->model].radio.type == EM28XX_RADIO) {
-               dev->radio_dev = em28xx_vdev_init(dev, &em28xx_radio_template,
-                                       VFL_TYPE_RADIO, "radio");
+               dev->radio_dev = em28xx_vdev_init(dev, &em28xx_radio_template, "radio");
                if (NULL == dev->radio_dev) {
                        em28xx_errdev("cannot allocate video_device.\n");
                        goto fail_unreg;
index 3e71ea7bbe244e0a05781e37fe60a8a7fd1a442a..2d170d101c2197f348f1e2c2a111891144b46bd2 100644 (file)
@@ -2585,7 +2585,6 @@ et61x251_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
        }
 
        strcpy(cam->v4ldev->name, "ET61X[12]51 PC Camera");
-       cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES;
        cam->v4ldev->fops = &et61x251_fops;
        cam->v4ldev->minor = video_nr[dev_nr];
        cam->v4ldev->release = video_device_release;
index ab053a26023eab683c33c677db87fced2082710c..bc301bae0482c1f98bb822c688eb733a9b44042e 100644 (file)
@@ -1691,7 +1691,6 @@ static const struct v4l2_ioctl_ops dev_ioctl_ops = {
 
 static struct video_device gspca_template = {
        .name = "gspca main driver",
-       .type = VID_TYPE_CAPTURE,
        .fops = &dev_fops,
        .ioctl_ops = &dev_ioctl_ops,
        .release = dev_release,         /* mandatory */
index b883c4e08fbd7e79951f85204c07189c72f22081..54d2023b26c4b341ff742a43149eb7063b0a9f84 100644 (file)
@@ -208,11 +208,6 @@ static int ivtv_prep_dev(struct ivtv *itv, int type)
                return -ENOMEM;
        }
 
-       s->v4l2dev->type = VID_TYPE_CAPTURE | VID_TYPE_TUNER | VID_TYPE_TELETEXT |
-                   VID_TYPE_CLIPPING | VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER;
-       if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) {
-               s->v4l2dev->type |= VID_TYPE_MPEG_DECODER;
-       }
        snprintf(s->v4l2dev->name, sizeof(s->v4l2dev->name), "ivtv%d %s",
                        itv->num, s->name);
 
index f9a6e1e8b4bdd87a5c8fa0a9fc46b1e69e86cce8..7c8ef6ac6c39cf646a9cfc3d4223d8bea51e48de 100644 (file)
@@ -1721,7 +1721,6 @@ static const struct v4l2_ioctl_ops meye_ioctl_ops = {
 
 static struct video_device meye_template = {
        .name           = "meye",
-       .type           = VID_TYPE_CAPTURE,
        .fops           = &meye_fops,
        .ioctl_ops      = &meye_ioctl_ops,
        .release        = video_device_release,
index 2374ebc084d4432d17ff47735f6c99c866999809..9edaca4371d7cedb5903d324e531eb4f16469a38 100644 (file)
@@ -4667,7 +4667,6 @@ static const struct file_operations ov511_fops = {
 
 static struct video_device vdev_template = {
        .name =         "OV511 USB Camera",
-       .type =         VID_TYPE_CAPTURE,
        .fops =         &ov511_fops,
        .release =      video_device_release,
        .minor =        -1,
index 8c72e4df85ab43ca0d269c876221b139f80a7534..00425d7436569e8081e525892fbf8b7f464b1683 100644 (file)
@@ -896,7 +896,6 @@ static const struct file_operations pms_fops = {
 static struct video_device pms_template=
 {
        .name           = "Mediavision PMS",
-       .type           = VID_TYPE_CAPTURE,
        .fops           = &pms_fops,
 };
 
index ceb549ac752d0fa399b6eb9fc5ae1a209bdf5872..00306faeac015f1ab9a99c8aaf32b894032bc444 100644 (file)
@@ -1161,10 +1161,6 @@ static const struct file_operations vdev_fops = {
 
 
 static struct video_device vdev_template = {
-       .type       = VID_TYPE_CAPTURE | VID_TYPE_TUNER,
-       .type2      = (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VBI_CAPTURE
-                      | V4L2_CAP_TUNER | V4L2_CAP_AUDIO
-                      | V4L2_CAP_READWRITE),
        .fops       = &vdev_fops,
 };
 
index 436a47caf52dfa8555c76f840169c72b56712c30..9aee7cb6f79a9e310e57021ac7d50a1fb73d0dc9 100644 (file)
@@ -166,7 +166,6 @@ static const struct file_operations pwc_fops = {
 };
 static struct video_device pwc_template = {
        .name =         "Philips Webcam",       /* Filled in later */
-       .type =         VID_TYPE_CAPTURE,
        .release =      video_device_release,
        .fops =         &pwc_fops,
        .minor =        -1,
index 92dfb1845ff4f1623ab5b61bc6f2d92a39477e37..b1d09d8e2b8572c35c88be39100cf35dbc7e21ba 100644 (file)
@@ -1705,7 +1705,6 @@ static const struct v4l2_ioctl_ops s2255_ioctl_ops = {
 
 static struct video_device template = {
        .name = "s2255v",
-       .type = VID_TYPE_CAPTURE,
        .fops = &s2255_fops_v4l,
        .ioctl_ops = &s2255_ioctl_ops,
        .minor = -1,
index e6a3fa4829827be13a36bfd43d3cacaa479b5e22..6ee63e69b36c4d7106fd0b2bcafb0433df47d64b 100644 (file)
@@ -831,7 +831,6 @@ static const struct file_operations saa_fops = {
 static struct video_device saa_template =
 {
        .name     = IF_NAME,
-       .type     = VID_TYPE_TELETEXT,
        .fops     = &saa_fops,
        .release  = video_device_release,
        .minor    = -1,
index 6f14619bda4a5b87f04890605fbd0fa39187c97b..0d639738d4e68044f4fa651b97d35573b820da83 100644 (file)
@@ -712,7 +712,6 @@ static const struct file_operations saa_fops = {
 static struct video_device saa_template =
 {
        .name           = IF_NAME,
-       .type           = VID_TYPE_TELETEXT,    /*| VID_TYPE_TUNER ?? */
        .fops           = &saa_fops,
 };
 
index a404368308aa1c9213054607e6ad0e14a6e7b94e..75d618415f4f401e9b9239e8d936ef8d8d0647eb 100644 (file)
@@ -1008,11 +1008,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
        v4l2_prio_init(&dev->prio);
 
        /* register v4l devices */
-       if (saa7134_no_overlay <= 0) {
-               saa7134_video_template.type |= VID_TYPE_OVERLAY;
-       } else {
-               printk("%s: Overlay support disabled.\n",dev->name);
-       }
+       if (saa7134_no_overlay > 0)
+               printk(KERN_INFO "%s: Overlay support disabled.\n", dev->name);
+
        dev->video_dev = vdev_init(dev,&saa7134_video_template,"video");
        err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER,
                                    video_nr[dev->nr]);
@@ -1025,7 +1023,6 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
               dev->name,dev->video_dev->minor & 0x1f);
 
        dev->vbi_dev = vdev_init(dev, &saa7134_video_template, "vbi");
-       dev->vbi_dev->type = VID_TYPE_TUNER | VID_TYPE_TELETEXT;
 
        err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI,
                                    vbi_nr[dev->nr]);
index cd52d5be404da0347fb103a223c532a96038f59d..c0c5d7509c25a81c9fb5fda2c79b74cf2314617a 100644 (file)
@@ -439,8 +439,6 @@ static const struct v4l2_ioctl_ops ts_ioctl_ops = {
 
 static struct video_device saa7134_empress_template = {
        .name          = "saa7134-empress",
-       .type          = 0 /* FIXME */,
-       .type2         = 0 /* FIXME */,
        .fops          = &ts_fops,
        .minor         = -1,
        .ioctl_ops     = &ts_ioctl_ops,
index eb824897416b64a1ff884c27298b5464894a71ad..68c268981861dee9e8abc93e640a036480eecce8 100644 (file)
@@ -2451,8 +2451,6 @@ static const struct v4l2_ioctl_ops radio_ioctl_ops = {
 
 struct video_device saa7134_video_template = {
        .name                           = "saa7134-video",
-       .type                           = VID_TYPE_CAPTURE|VID_TYPE_TUNER |
-                                       VID_TYPE_CLIPPING|VID_TYPE_SCALES,
        .fops                           = &video_fops,
        .ioctl_ops                      = &video_ioctl_ops,
        .minor                          = -1,
@@ -2462,7 +2460,6 @@ struct video_device saa7134_video_template = {
 
 struct video_device saa7134_radio_template = {
        .name                   = "saa7134-radio",
-       .type                   = VID_TYPE_TUNER,
        .fops                   = &radio_fops,
        .ioctl_ops              = &radio_ioctl_ops,
        .minor                  = -1,
index b4dd60b0f8f2fc225d1c117273510199247d6ada..f481277892da9be5eedf81d4ffe93043a5a012b1 100644 (file)
@@ -1231,7 +1231,6 @@ static const struct file_operations se401_fops = {
 };
 static struct video_device se401_template = {
        .name =         "se401 USB camera",
-       .type =         VID_TYPE_CAPTURE,
        .fops =         &se401_fops,
 };
 
index c68bf0921e9eb00f64426cef9a6b104b5fd1fa34..23408764d0ef6db55e9f8df3eaa57fa57e8007ce 100644 (file)
@@ -3309,7 +3309,6 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
        }
 
        strcpy(cam->v4ldev->name, "SN9C1xx PC Camera");
-       cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES;
        cam->v4ldev->fops = &sn9c102_fops;
        cam->v4ldev->minor = video_nr[dev_nr];
        cam->v4ldev->release = video_device_release;
index 9ff56145258784fc4b1d8e42d54486ba701a4205..b6be5ee678b6112514b70c3335282919259219f0 100644 (file)
@@ -908,7 +908,6 @@ int soc_camera_video_start(struct soc_camera_device *icd)
        strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name));
        /* Maybe better &ici->dev */
        vdev->parent            = &icd->dev;
-       vdev->type              = VID_TYPE_CAPTURE;
        vdev->current_norm      = V4L2_STD_UNKNOWN;
        vdev->fops              = &soc_camera_fops;
        vdev->ioctl_ops         = &soc_camera_ioctl_ops;
index a8a72768ca91948dcf5a4550e51c50aee5813ab4..ad36af30e0992195fa1f72da85428f394d4251a4 100644 (file)
@@ -1359,8 +1359,6 @@ static void stk_v4l_dev_release(struct video_device *vd)
 
 static struct video_device stk_v4l_data = {
        .name = "stkwebcam",
-       .type = VFL_TYPE_GRABBER,
-       .type2 = VID_TYPE_CAPTURE,
        .minor = -1,
        .tvnorms = V4L2_STD_UNKNOWN,
        .current_norm = V4L2_STD_UNKNOWN,
index 6ace8923b797b25ca944368e44fae0b7bc965d90..276bded06ab3eb9ac9b7f9414000b1918d81ce24 100644 (file)
@@ -1919,7 +1919,6 @@ static const struct file_operations saa_fops = {
 /* template for video_device-structure */
 static struct video_device saa_template = {
        .name = "SAA7146A",
-       .type = VID_TYPE_CAPTURE | VID_TYPE_OVERLAY,
        .fops = &saa_fops,
        .minor = -1,
 };
index 9053d5a0b1c36e2848f65c3f2b9f8ff860f3472a..56dc3d6b5b29e6e64d1589f2232577b76be0dba5 100644 (file)
@@ -1403,7 +1403,6 @@ static const struct file_operations stv680_fops = {
 };
 static struct video_device stv680_template = {
        .name =         "STV0680 USB camera",
-       .type =         VID_TYPE_CAPTURE,
        .fops =         &stv680_fops,
        .release =      video_device_release,
        .minor =        -1,
index 357cee40fb38301fc4e1df4c63707c0c316efc7d..bf1bc2f69b02f727a4cad6ff13cf1f9b46b96a55 100644 (file)
@@ -952,7 +952,6 @@ static const struct file_operations usbvideo_fops = {
        .llseek = no_llseek,
 };
 static const struct video_device usbvideo_template = {
-       .type =       VID_TYPE_CAPTURE,
        .fops =       &usbvideo_fops,
 };
 
index b8e8fceee525dc42a0e282fd69081bfd59abc345..b7792451a2993f4d2f0329958e5ab0adefc52a5d 100644 (file)
@@ -793,7 +793,6 @@ static const struct file_operations vicam_fops = {
 
 static struct video_device vicam_template = {
        .name           = "ViCam-based USB Camera",
-       .type           = VID_TYPE_CAPTURE,
        .fops           = &vicam_fops,
        .minor          = -1,
 };
index a65e5db0a3250a78cdb6d3df8bca6805707bf28c..b977116a0dd99ccfa6475940c01bb860605dea13 100644 (file)
@@ -1405,7 +1405,6 @@ static const struct v4l2_ioctl_ops usbvision_ioctl_ops = {
 };
 
 static struct video_device usbvision_video_template = {
-       .type           = VID_TYPE_TUNER | VID_TYPE_CAPTURE,
        .fops           = &usbvision_fops,
        .ioctl_ops      = &usbvision_ioctl_ops,
        .name           = "usbvision-video",
@@ -1443,7 +1442,6 @@ static const struct v4l2_ioctl_ops usbvision_radio_ioctl_ops = {
 };
 
 static struct video_device usbvision_radio_template = {
-       .type           = VID_TYPE_TUNER,
        .fops           = &usbvision_radio_fops,
        .name           = "usbvision-radio",
        .release        = video_device_release,
@@ -1466,7 +1464,6 @@ static const struct file_operations usbvision_vbi_fops = {
 
 static struct video_device usbvision_vbi_template=
 {
-       .type           = VID_TYPE_TUNER,
        .fops           = &usbvision_vbi_fops,
        .release        = video_device_release,
        .name           = "usbvision-vbi",
index 79d6821c4741cb37411f5f826830115690cfc46f..b3c4d75e84903a0f2e421544387c5c4258185f7e 100644 (file)
@@ -1459,8 +1459,6 @@ static int uvc_register_video(struct uvc_device *dev)
         * get another one.
         */
        vdev->parent = &dev->intf->dev;
-       vdev->type = 0;
-       vdev->type2 = 0;
        vdev->minor = -1;
        vdev->fops = &uvc_fops;
        vdev->release = video_device_release;
index 88eeee1d8baf5a80c5c9161e1c3f1779e601fbb1..556615fe93de1737b756105174dee4d8b80255f2 100644 (file)
@@ -302,6 +302,7 @@ int video_register_device_index(struct video_device *vfd, int type, int nr,
                }
        }
        video_device[i] = vfd;
+       vfd->vfl_type = type;
        vfd->minor = i;
 
        ret = get_index(vfd, index);
index f0fcb008b7232d5bc61d94ea18aea395ffe7862c..3989b0eded28c7d8152ec013e3ea270982b45785 100644 (file)
@@ -4385,8 +4385,6 @@ static const struct file_operations vino_fops = {
 
 static struct video_device v4l_device_template = {
        .name           = "NOT SET",
-       /*.type         = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE | */
-       /*      VID_TYPE_CLIPPING | VID_TYPE_SCALES, VID_TYPE_OVERLAY */
        .fops           = &vino_fops,
        .minor          = -1,
 };
index 639210e5264707dfb3d0db62397ebb8e52bb5ccc..3518af071a2e2633cc7ec7a62cde3a6ab5cb6c95 100644 (file)
@@ -1092,7 +1092,6 @@ static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
 
 static struct video_device vivi_template = {
        .name           = "vivi",
-       .type           = VID_TYPE_CAPTURE,
        .fops           = &vivi_fops,
        .ioctl_ops      = &vivi_ioctl_ops,
        .minor          = -1,
index 925b4e7b557d738cf1da79eaecb9c2abf7f10915..9402f40095b469f1caced200f9f63e04b74b7c00 100644 (file)
@@ -197,7 +197,6 @@ static const struct file_operations w9966_fops = {
 };
 static struct video_device w9966_template = {
        .name           = W9966_DRIVERNAME,
-       .type           = VID_TYPE_CAPTURE | VID_TYPE_SCALES,
        .fops           = &w9966_fops,
 };
 
index 8f665953c80c5ae5287303e20c5952a0bc96a002..168baabe46591b02b9276e11987aaee44679ac63 100644 (file)
@@ -3550,7 +3550,6 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
        }
 
        strcpy(cam->v4ldev->name, symbolic(camlist, mod_id));
-       cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES;
        cam->v4ldev->fops = &w9968cf_fops;
        cam->v4ldev->minor = video_nr[dev_nr];
        cam->v4ldev->release = video_device_release;
index 0978a7e946b4b218587e0e39de5666fc681be74c..550ce7bd5c87d8720402abc0e98f15d7b654b5f9 100644 (file)
@@ -1985,7 +1985,6 @@ zc0301_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
        }
 
        strcpy(cam->v4ldev->name, "ZC0301[P] PC Camera");
-       cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES;
        cam->v4ldev->fops = &zc0301_fops;
        cam->v4ldev->minor = video_nr[dev_nr];
        cam->v4ldev->release = video_device_release;
index 3ca58221d5a9e08bf4d42da9d205d59a876a12df..ec6f59674b105c281d25a6a59e8b6696eeff7f7d 100644 (file)
@@ -4644,8 +4644,6 @@ static const struct file_operations zoran_fops = {
 
 struct video_device zoran_template __devinitdata = {
        .name = ZORAN_NAME,
-       .type = ZORAN_VID_TYPE,
-       .type2 = ZORAN_V4L2_VID_FLAGS,
        .fops = &zoran_fops,
        .release = &zoran_vdev_release,
        .minor = -1
index 36ba36a5e2ea626f6ddb49de5d9bbdbb1aa19ca6..18d1c4ba79fbf7c8384ba8497320d180ad226b44 100644 (file)
@@ -780,7 +780,6 @@ static const struct v4l2_ioctl_ops zr364xx_ioctl_ops = {
 
 static struct video_device zr364xx_template = {
        .name = DRIVER_DESC,
-       .type = VID_TYPE_CAPTURE,
        .fops = &zr364xx_fops,
        .ioctl_ops = &zr364xx_ioctl_ops,
        .release = video_device_release,
index 2fe38858516b6441c1eddd93769988f547b96cc1..21419da44cb60341a2efb7563efb3fdc4858d5a8 100644 (file)
@@ -53,8 +53,7 @@ struct video_device
 
        /* device info */
        char name[32];
-       int type;                       /* v4l1 */
-       int type2;                      /* v4l2 */
+       int vfl_type;
        int minor;
        /* attribute to diferentiate multiple indexs on one physical device */
        int index;
index 187c9527725f026647033dcc5a900bdd6bd3e794..83e90057270ead89f272ffe34fd6c3515a2b8a28 100644 (file)
@@ -190,7 +190,6 @@ void snd_tea575x_init(struct snd_tea575x *tea)
 
        memset(&tea->vd, 0, sizeof(tea->vd));
        strcpy(tea->vd.name, tea->tea5759 ? "TEA5759 radio" : "TEA5757 radio");
-       tea->vd.type = VID_TYPE_TUNER;
        tea->vd.release = snd_tea575x_release;
        video_set_drvdata(&tea->vd, tea);
        tea->vd.fops = &tea->fops;