Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

V4L/DVB (8523): v4l2-dev: remove unused type and type2 field from video_device

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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
0ea6bc8d c52e4f58

+14 -124
+1 -1
drivers/media/common/saa7146_fops.c
··· 563 563 564 564 DEB_EE(("dev:%p\n",dev)); 565 565 566 - if( VFL_TYPE_GRABBER == (*vid)->type ) { 566 + if ((*vid)->vfl_type == VFL_TYPE_GRABBER) { 567 567 vv->video_minor = -1; 568 568 } else { 569 569 vv->vbi_minor = -1;
-1
drivers/media/radio/dsbr100.c
··· 463 463 /* V4L2 interface */ 464 464 static struct video_device dsbr100_videodev_template = { 465 465 .name = "D-Link DSB-R 100", 466 - .type = VID_TYPE_TUNER, 467 466 .fops = &usb_dsbr100_fops, 468 467 .ioctl_ops = &usb_dsbr100_ioctl_ops, 469 468 .release = video_device_release,
-1
drivers/media/radio/miropcm20-radio.c
··· 230 230 231 231 static struct video_device pcm20_radio = { 232 232 .name = "Miro PCM 20 radio", 233 - .type = VID_TYPE_TUNER, 234 233 .fops = &pcm20_fops, 235 234 .priv = &pcm20_unit 236 235 };
-1
drivers/media/radio/radio-aimslab.c
··· 406 406 407 407 static struct video_device rtrack_radio = { 408 408 .name = "RadioTrack radio", 409 - .type = VID_TYPE_TUNER, 410 409 .fops = &rtrack_fops, 411 410 .ioctl_ops = &rtrack_ioctl_ops, 412 411 };
-1
drivers/media/radio/radio-aztech.c
··· 370 370 371 371 static struct video_device aztech_radio = { 372 372 .name = "Aztech radio", 373 - .type = VID_TYPE_TUNER, 374 373 .fops = &aztech_fops, 375 374 .ioctl_ops = &aztech_ioctl_ops, 376 375 };
-1
drivers/media/radio/radio-cadet.c
··· 587 587 588 588 static struct video_device cadet_radio = { 589 589 .name = "Cadet radio", 590 - .type = VID_TYPE_TUNER, 591 590 .fops = &cadet_fops, 592 591 .ioctl_ops = &cadet_ioctl_ops, 593 592 };
-1
drivers/media/radio/radio-gemtek-pci.c
··· 392 392 393 393 static struct video_device vdev_template = { 394 394 .name = "Gemtek PCI Radio", 395 - .type = VID_TYPE_TUNER, 396 395 .fops = &gemtek_pci_fops, 397 396 .ioctl_ops = &gemtek_pci_ioctl_ops, 398 397 };
-1
drivers/media/radio/radio-gemtek.c
··· 570 570 571 571 static struct video_device gemtek_radio = { 572 572 .name = "GemTek Radio card", 573 - .type = VID_TYPE_TUNER, 574 573 .fops = &gemtek_fops, 575 574 .ioctl_ops = &gemtek_ioctl_ops, 576 575 };
-1
drivers/media/radio/radio-maestro.c
··· 372 372 373 373 static struct video_device maestro_radio = { 374 374 .name = "Maestro radio", 375 - .type = VID_TYPE_TUNER, 376 375 .fops = &maestro_fops, 377 376 .ioctl_ops = &maestro_ioctl_ops, 378 377 };
-1
drivers/media/radio/radio-maxiradio.c
··· 391 391 392 392 static struct video_device maxiradio_radio = { 393 393 .name = "Maxi Radio FM2000 radio", 394 - .type = VID_TYPE_TUNER, 395 394 .fops = &maxiradio_fops, 396 395 .ioctl_ops = &maxiradio_ioctl_ops, 397 396 };
-1
drivers/media/radio/radio-rtrack2.c
··· 312 312 313 313 static struct video_device rtrack2_radio = { 314 314 .name = "RadioTrack II radio", 315 - .type = VID_TYPE_TUNER, 316 315 .fops = &rtrack2_fops, 317 316 .ioctl_ops = &rtrack2_ioctl_ops, 318 317 };
-1
drivers/media/radio/radio-sf16fmi.c
··· 312 312 313 313 static struct video_device fmi_radio = { 314 314 .name = "SF16FMx radio", 315 - .type = VID_TYPE_TUNER, 316 315 .fops = &fmi_fops, 317 316 .ioctl_ops = &fmi_ioctl_ops, 318 317 };
-1
drivers/media/radio/radio-sf16fmr2.c
··· 428 428 429 429 static struct video_device fmr2_radio = { 430 430 .name = "SF16FMR2 radio", 431 - .type = VID_TYPE_TUNER, 432 431 .fops = &fmr2_fops, 433 432 .ioctl_ops = &fmr2_ioctl_ops, 434 433 };
-1
drivers/media/radio/radio-si470x.c
··· 1609 1609 .fops = &si470x_fops, 1610 1610 .ioctl_ops = &si470x_ioctl_ops, 1611 1611 .name = DRIVER_NAME, 1612 - .type = VID_TYPE_TUNER, 1613 1612 .release = video_device_release, 1614 1613 }; 1615 1614
-1
drivers/media/radio/radio-terratec.c
··· 384 384 385 385 static struct video_device terratec_radio = { 386 386 .name = "TerraTec ActiveRadio", 387 - .type = VID_TYPE_TUNER, 388 387 .fops = &terratec_fops, 389 388 .ioctl_ops = &terratec_ioctl_ops, 390 389 };
-1
drivers/media/radio/radio-trust.c
··· 364 364 365 365 static struct video_device trust_radio = { 366 366 .name = "Trust FM Radio", 367 - .type = VID_TYPE_TUNER, 368 367 .fops = &trust_fops, 369 368 .ioctl_ops = &trust_ioctl_ops, 370 369 };
-1
drivers/media/radio/radio-typhoon.c
··· 362 362 363 363 static struct video_device typhoon_radio = { 364 364 .name = "Typhoon Radio", 365 - .type = VID_TYPE_TUNER, 366 365 .fops = &typhoon_fops, 367 366 .ioctl_ops = &typhoon_ioctl_ops, 368 367 };
-1
drivers/media/radio/radio-zoltrix.c
··· 425 425 426 426 static struct video_device zoltrix_radio = { 427 427 .name = "Zoltrix Radio Plus", 428 - .type = VID_TYPE_TUNER, 429 428 .fops = &zoltrix_fops, 430 429 .ioctl_ops = &zoltrix_ioctl_ops, 431 430 };
+5 -18
drivers/media/video/bt8xx/bttv-driver.c
··· 4182 4182 4183 4183 static struct video_device *vdev_init(struct bttv *btv, 4184 4184 const struct video_device *template, 4185 - const char *type_name, 4186 - const int type) 4185 + const char *type_name) 4187 4186 { 4188 4187 struct video_device *vfd; 4189 4188 ··· 4193 4194 vfd->minor = -1; 4194 4195 vfd->parent = &btv->c.pci->dev; 4195 4196 vfd->release = video_device_release; 4196 - vfd->type = type; 4197 4197 vfd->debug = bttv_debug; 4198 4198 snprintf(vfd->name, sizeof(vfd->name), "BT%d%s %s (%s)", 4199 4199 btv->id, (btv->id==848 && btv->revision==0x12) ? "A" : "", ··· 4228 4230 /* register video4linux devices */ 4229 4231 static int __devinit bttv_register_video(struct bttv *btv) 4230 4232 { 4231 - int video_type = VID_TYPE_CAPTURE | 4232 - VID_TYPE_TUNER | 4233 - VID_TYPE_CLIPPING| 4234 - VID_TYPE_SCALES; 4235 - 4236 - if (no_overlay <= 0) { 4237 - bttv_video_template.type |= VID_TYPE_OVERLAY; 4238 - } else { 4233 + if (no_overlay > 0) 4239 4234 printk("bttv: Overlay support disabled.\n"); 4240 - } 4241 4235 4242 4236 /* video */ 4243 - btv->video_dev = vdev_init(btv, &bttv_video_template, 4244 - "video", video_type); 4237 + btv->video_dev = vdev_init(btv, &bttv_video_template, "video"); 4245 4238 4246 4239 if (NULL == btv->video_dev) 4247 4240 goto err; ··· 4248 4259 } 4249 4260 4250 4261 /* vbi */ 4251 - btv->vbi_dev = vdev_init(btv, &bttv_video_template, 4252 - "vbi", VID_TYPE_TUNER | VID_TYPE_TELETEXT); 4262 + btv->vbi_dev = vdev_init(btv, &bttv_video_template, "vbi"); 4253 4263 4254 4264 if (NULL == btv->vbi_dev) 4255 4265 goto err; ··· 4260 4272 if (!btv->has_radio) 4261 4273 return 0; 4262 4274 /* radio */ 4263 - btv->radio_dev = vdev_init(btv, &radio_template, 4264 - "radio", VID_TYPE_TUNER); 4275 + btv->radio_dev = vdev_init(btv, &radio_template, "radio"); 4265 4276 if (NULL == btv->radio_dev) 4266 4277 goto err; 4267 4278 if (video_register_device(btv->radio_dev, VFL_TYPE_RADIO,radio_nr)<0)
-1
drivers/media/video/bw-qcam.c
··· 908 908 static struct video_device qcam_template= 909 909 { 910 910 .name = "Connectix Quickcam", 911 - .type = VID_TYPE_CAPTURE, 912 911 .fops = &qcam_fops, 913 912 }; 914 913
-1
drivers/media/video/c-qcam.c
··· 703 703 static struct video_device qcam_template= 704 704 { 705 705 .name = "Colour QuickCam", 706 - .type = VID_TYPE_CAPTURE, 707 706 .fops = &qcam_fops, 708 707 }; 709 708
-2
drivers/media/video/cafe_ccic.c
··· 1794 1794 1795 1795 static struct video_device cafe_v4l_template = { 1796 1796 .name = "cafe", 1797 - .type = VFL_TYPE_GRABBER, 1798 - .type2 = VID_TYPE_CAPTURE, 1799 1797 .minor = -1, /* Get one dynamically */ 1800 1798 .tvnorms = V4L2_STD_NTSC_M, 1801 1799 .current_norm = V4L2_STD_NTSC_M, /* make mplayer happy */
-1
drivers/media/video/cpia.c
··· 3800 3800 3801 3801 static struct video_device cpia_template = { 3802 3802 .name = "CPiA Camera", 3803 - .type = VID_TYPE_CAPTURE, 3804 3803 .fops = &cpia_fops, 3805 3804 }; 3806 3805
-3
drivers/media/video/cpia2/cpia2_v4l.c
··· 1937 1937 static struct video_device cpia2_template = { 1938 1938 /* I could not find any place for the old .initialize initializer?? */ 1939 1939 .name= "CPiA2 Camera", 1940 - .type= VID_TYPE_CAPTURE, 1941 - .type2 = V4L2_CAP_VIDEO_CAPTURE | 1942 - V4L2_CAP_STREAMING, 1943 1940 .minor= -1, 1944 1941 .fops= &fops_template, 1945 1942 .release= video_device_release,
-3
drivers/media/video/cx18/cx18-streams.c
··· 187 187 return -ENOMEM; 188 188 } 189 189 190 - s->v4l2dev->type = 191 - VID_TYPE_CAPTURE | VID_TYPE_TUNER | VID_TYPE_TELETEXT | 192 - VID_TYPE_CLIPPING | VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER; 193 190 snprintf(s->v4l2dev->name, sizeof(s->v4l2dev->name), "cx18-%d", 194 191 cx->num); 195 192
-4
drivers/media/video/cx23885/cx23885-417.c
··· 1731 1731 1732 1732 static struct video_device cx23885_mpeg_template = { 1733 1733 .name = "cx23885", 1734 - .type = VID_TYPE_CAPTURE | 1735 - VID_TYPE_TUNER | 1736 - VID_TYPE_SCALES | 1737 - VID_TYPE_MPEG_ENCODER, 1738 1734 .fops = &mpeg_fops, 1739 1735 .ioctl_ops = &mpeg_ioctl_ops, 1740 1736 .minor = -1,
-2
drivers/media/video/cx23885/cx23885-video.c
··· 1472 1472 static struct video_device cx23885_vbi_template; 1473 1473 static struct video_device cx23885_video_template = { 1474 1474 .name = "cx23885-video", 1475 - .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES, 1476 1475 .fops = &video_fops, 1477 1476 .minor = -1, 1478 1477 .ioctl_ops = &video_ioctl_ops, ··· 1516 1517 memcpy(&cx23885_vbi_template, &cx23885_video_template, 1517 1518 sizeof(cx23885_vbi_template)); 1518 1519 strcpy(cx23885_vbi_template.name, "cx23885-vbi"); 1519 - cx23885_vbi_template.type = VID_TYPE_TELETEXT|VID_TYPE_TUNER; 1520 1520 1521 1521 dev->tvnorm = cx23885_video_template.current_norm; 1522 1522
-2
drivers/media/video/cx88/cx88-blackbird.c
··· 1207 1207 1208 1208 static struct video_device cx8802_mpeg_template = { 1209 1209 .name = "cx8802", 1210 - .type = VID_TYPE_CAPTURE | VID_TYPE_TUNER | 1211 - VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER, 1212 1210 .fops = &mpeg_fops, 1213 1211 .ioctl_ops = &mpeg_ioctl_ops, 1214 1212 .minor = -1,
-3
drivers/media/video/cx88/cx88-video.c
··· 1722 1722 1723 1723 static struct video_device cx8800_video_template = { 1724 1724 .name = "cx8800-video", 1725 - .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES, 1726 1725 .fops = &video_fops, 1727 1726 .minor = -1, 1728 1727 .ioctl_ops = &video_ioctl_ops, ··· 1760 1761 1761 1762 static struct video_device cx8800_radio_template = { 1762 1763 .name = "cx8800-radio", 1763 - .type = VID_TYPE_TUNER, 1764 1764 .fops = &radio_fops, 1765 1765 .minor = -1, 1766 1766 .ioctl_ops = &radio_ioctl_ops, ··· 1836 1838 memcpy( &cx8800_vbi_template, &cx8800_video_template, 1837 1839 sizeof(cx8800_vbi_template) ); 1838 1840 strcpy(cx8800_vbi_template.name,"cx8800-vbi"); 1839 - cx8800_vbi_template.type = VID_TYPE_TELETEXT|VID_TYPE_TUNER; 1840 1841 1841 1842 /* initialize driver struct */ 1842 1843 spin_lock_init(&dev->slock);
+3 -11
drivers/media/video/em28xx/em28xx-video.c
··· 1845 1845 1846 1846 static struct video_device em28xx_radio_template = { 1847 1847 .name = "em28xx-radio", 1848 - .type = VID_TYPE_TUNER, 1849 1848 .fops = &radio_fops, 1850 1849 .ioctl_ops = &radio_ioctl_ops, 1851 1850 .minor = -1, ··· 1890 1891 1891 1892 static struct video_device *em28xx_vdev_init(struct em28xx *dev, 1892 1893 const struct video_device *template, 1893 - const int type, 1894 1894 const char *type_name) 1895 1895 { 1896 1896 struct video_device *vfd; ··· 1901 1903 vfd->minor = -1; 1902 1904 vfd->parent = &dev->udev->dev; 1903 1905 vfd->release = video_device_release; 1904 - vfd->type = type; 1905 1906 vfd->debug = video_debug; 1906 1907 1907 1908 snprintf(vfd->name, sizeof(vfd->name), "%s %s", ··· 1978 1981 list_add_tail(&dev->devlist, &em28xx_devlist); 1979 1982 1980 1983 /* allocate and fill video video_device struct */ 1981 - dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, 1982 - VID_TYPE_CAPTURE, "video"); 1984 + dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video"); 1983 1985 if (NULL == dev->vdev) { 1984 1986 em28xx_errdev("cannot allocate video_device.\n"); 1985 1987 goto fail_unreg; 1986 1988 } 1987 - if (dev->tuner_type != TUNER_ABSENT) 1988 - dev->vdev->type |= VID_TYPE_TUNER; 1989 1989 1990 1990 /* register v4l2 video video_device */ 1991 1991 retval = video_register_device(dev->vdev, VFL_TYPE_GRABBER, ··· 1994 2000 } 1995 2001 1996 2002 /* Allocate and fill vbi video_device struct */ 1997 - dev->vbi_dev = em28xx_vdev_init(dev, &em28xx_video_template, 1998 - VFL_TYPE_VBI, "vbi"); 2003 + dev->vbi_dev = em28xx_vdev_init(dev, &em28xx_video_template, "vbi"); 1999 2004 /* register v4l2 vbi video_device */ 2000 2005 if (video_register_device(dev->vbi_dev, VFL_TYPE_VBI, 2001 2006 vbi_nr[dev->devno]) < 0) { ··· 2004 2011 } 2005 2012 2006 2013 if (em28xx_boards[dev->model].radio.type == EM28XX_RADIO) { 2007 - dev->radio_dev = em28xx_vdev_init(dev, &em28xx_radio_template, 2008 - VFL_TYPE_RADIO, "radio"); 2014 + dev->radio_dev = em28xx_vdev_init(dev, &em28xx_radio_template, "radio"); 2009 2015 if (NULL == dev->radio_dev) { 2010 2016 em28xx_errdev("cannot allocate video_device.\n"); 2011 2017 goto fail_unreg;
-1
drivers/media/video/et61x251/et61x251_core.c
··· 2585 2585 } 2586 2586 2587 2587 strcpy(cam->v4ldev->name, "ET61X[12]51 PC Camera"); 2588 - cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; 2589 2588 cam->v4ldev->fops = &et61x251_fops; 2590 2589 cam->v4ldev->minor = video_nr[dev_nr]; 2591 2590 cam->v4ldev->release = video_device_release;
-1
drivers/media/video/gspca/gspca.c
··· 1691 1691 1692 1692 static struct video_device gspca_template = { 1693 1693 .name = "gspca main driver", 1694 - .type = VID_TYPE_CAPTURE, 1695 1694 .fops = &dev_fops, 1696 1695 .ioctl_ops = &dev_ioctl_ops, 1697 1696 .release = dev_release, /* mandatory */
-5
drivers/media/video/ivtv/ivtv-streams.c
··· 208 208 return -ENOMEM; 209 209 } 210 210 211 - s->v4l2dev->type = VID_TYPE_CAPTURE | VID_TYPE_TUNER | VID_TYPE_TELETEXT | 212 - VID_TYPE_CLIPPING | VID_TYPE_SCALES | VID_TYPE_MPEG_ENCODER; 213 - if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) { 214 - s->v4l2dev->type |= VID_TYPE_MPEG_DECODER; 215 - } 216 211 snprintf(s->v4l2dev->name, sizeof(s->v4l2dev->name), "ivtv%d %s", 217 212 itv->num, s->name); 218 213
-1
drivers/media/video/meye.c
··· 1721 1721 1722 1722 static struct video_device meye_template = { 1723 1723 .name = "meye", 1724 - .type = VID_TYPE_CAPTURE, 1725 1724 .fops = &meye_fops, 1726 1725 .ioctl_ops = &meye_ioctl_ops, 1727 1726 .release = video_device_release,
-1
drivers/media/video/ov511.c
··· 4667 4667 4668 4668 static struct video_device vdev_template = { 4669 4669 .name = "OV511 USB Camera", 4670 - .type = VID_TYPE_CAPTURE, 4671 4670 .fops = &ov511_fops, 4672 4671 .release = video_device_release, 4673 4672 .minor = -1,
-1
drivers/media/video/pms.c
··· 896 896 static struct video_device pms_template= 897 897 { 898 898 .name = "Mediavision PMS", 899 - .type = VID_TYPE_CAPTURE, 900 899 .fops = &pms_fops, 901 900 }; 902 901
-4
drivers/media/video/pvrusb2/pvrusb2-v4l2.c
··· 1161 1161 1162 1162 1163 1163 static struct video_device vdev_template = { 1164 - .type = VID_TYPE_CAPTURE | VID_TYPE_TUNER, 1165 - .type2 = (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VBI_CAPTURE 1166 - | V4L2_CAP_TUNER | V4L2_CAP_AUDIO 1167 - | V4L2_CAP_READWRITE), 1168 1164 .fops = &vdev_fops, 1169 1165 }; 1170 1166
-1
drivers/media/video/pwc/pwc-if.c
··· 166 166 }; 167 167 static struct video_device pwc_template = { 168 168 .name = "Philips Webcam", /* Filled in later */ 169 - .type = VID_TYPE_CAPTURE, 170 169 .release = video_device_release, 171 170 .fops = &pwc_fops, 172 171 .minor = -1,
-1
drivers/media/video/s2255drv.c
··· 1705 1705 1706 1706 static struct video_device template = { 1707 1707 .name = "s2255v", 1708 - .type = VID_TYPE_CAPTURE, 1709 1708 .fops = &s2255_fops_v4l, 1710 1709 .ioctl_ops = &s2255_ioctl_ops, 1711 1710 .minor = -1,
-1
drivers/media/video/saa5246a.c
··· 831 831 static struct video_device saa_template = 832 832 { 833 833 .name = IF_NAME, 834 - .type = VID_TYPE_TELETEXT, 835 834 .fops = &saa_fops, 836 835 .release = video_device_release, 837 836 .minor = -1,
-1
drivers/media/video/saa5249.c
··· 712 712 static struct video_device saa_template = 713 713 { 714 714 .name = IF_NAME, 715 - .type = VID_TYPE_TELETEXT, /*| VID_TYPE_TUNER ?? */ 716 715 .fops = &saa_fops, 717 716 }; 718 717
+3 -6
drivers/media/video/saa7134/saa7134-core.c
··· 1008 1008 v4l2_prio_init(&dev->prio); 1009 1009 1010 1010 /* register v4l devices */ 1011 - if (saa7134_no_overlay <= 0) { 1012 - saa7134_video_template.type |= VID_TYPE_OVERLAY; 1013 - } else { 1014 - printk("%s: Overlay support disabled.\n",dev->name); 1015 - } 1011 + if (saa7134_no_overlay > 0) 1012 + printk(KERN_INFO "%s: Overlay support disabled.\n", dev->name); 1013 + 1016 1014 dev->video_dev = vdev_init(dev,&saa7134_video_template,"video"); 1017 1015 err = video_register_device(dev->video_dev,VFL_TYPE_GRABBER, 1018 1016 video_nr[dev->nr]); ··· 1023 1025 dev->name,dev->video_dev->minor & 0x1f); 1024 1026 1025 1027 dev->vbi_dev = vdev_init(dev, &saa7134_video_template, "vbi"); 1026 - dev->vbi_dev->type = VID_TYPE_TUNER | VID_TYPE_TELETEXT; 1027 1028 1028 1029 err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI, 1029 1030 vbi_nr[dev->nr]);
-2
drivers/media/video/saa7134/saa7134-empress.c
··· 439 439 440 440 static struct video_device saa7134_empress_template = { 441 441 .name = "saa7134-empress", 442 - .type = 0 /* FIXME */, 443 - .type2 = 0 /* FIXME */, 444 442 .fops = &ts_fops, 445 443 .minor = -1, 446 444 .ioctl_ops = &ts_ioctl_ops,
-3
drivers/media/video/saa7134/saa7134-video.c
··· 2451 2451 2452 2452 struct video_device saa7134_video_template = { 2453 2453 .name = "saa7134-video", 2454 - .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER | 2455 - VID_TYPE_CLIPPING|VID_TYPE_SCALES, 2456 2454 .fops = &video_fops, 2457 2455 .ioctl_ops = &video_ioctl_ops, 2458 2456 .minor = -1, ··· 2460 2462 2461 2463 struct video_device saa7134_radio_template = { 2462 2464 .name = "saa7134-radio", 2463 - .type = VID_TYPE_TUNER, 2464 2465 .fops = &radio_fops, 2465 2466 .ioctl_ops = &radio_ioctl_ops, 2466 2467 .minor = -1,
-1
drivers/media/video/se401.c
··· 1231 1231 }; 1232 1232 static struct video_device se401_template = { 1233 1233 .name = "se401 USB camera", 1234 - .type = VID_TYPE_CAPTURE, 1235 1234 .fops = &se401_fops, 1236 1235 }; 1237 1236
-1
drivers/media/video/sn9c102/sn9c102_core.c
··· 3309 3309 } 3310 3310 3311 3311 strcpy(cam->v4ldev->name, "SN9C1xx PC Camera"); 3312 - cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; 3313 3312 cam->v4ldev->fops = &sn9c102_fops; 3314 3313 cam->v4ldev->minor = video_nr[dev_nr]; 3315 3314 cam->v4ldev->release = video_device_release;
-1
drivers/media/video/soc_camera.c
··· 908 908 strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name)); 909 909 /* Maybe better &ici->dev */ 910 910 vdev->parent = &icd->dev; 911 - vdev->type = VID_TYPE_CAPTURE; 912 911 vdev->current_norm = V4L2_STD_UNKNOWN; 913 912 vdev->fops = &soc_camera_fops; 914 913 vdev->ioctl_ops = &soc_camera_ioctl_ops;
-2
drivers/media/video/stk-webcam.c
··· 1359 1359 1360 1360 static struct video_device stk_v4l_data = { 1361 1361 .name = "stkwebcam", 1362 - .type = VFL_TYPE_GRABBER, 1363 - .type2 = VID_TYPE_CAPTURE, 1364 1362 .minor = -1, 1365 1363 .tvnorms = V4L2_STD_UNKNOWN, 1366 1364 .current_norm = V4L2_STD_UNKNOWN,
-1
drivers/media/video/stradis.c
··· 1919 1919 /* template for video_device-structure */ 1920 1920 static struct video_device saa_template = { 1921 1921 .name = "SAA7146A", 1922 - .type = VID_TYPE_CAPTURE | VID_TYPE_OVERLAY, 1923 1922 .fops = &saa_fops, 1924 1923 .minor = -1, 1925 1924 };
-1
drivers/media/video/stv680.c
··· 1403 1403 }; 1404 1404 static struct video_device stv680_template = { 1405 1405 .name = "STV0680 USB camera", 1406 - .type = VID_TYPE_CAPTURE, 1407 1406 .fops = &stv680_fops, 1408 1407 .release = video_device_release, 1409 1408 .minor = -1,
-1
drivers/media/video/usbvideo/usbvideo.c
··· 952 952 .llseek = no_llseek, 953 953 }; 954 954 static const struct video_device usbvideo_template = { 955 - .type = VID_TYPE_CAPTURE, 956 955 .fops = &usbvideo_fops, 957 956 }; 958 957
-1
drivers/media/video/usbvideo/vicam.c
··· 793 793 794 794 static struct video_device vicam_template = { 795 795 .name = "ViCam-based USB Camera", 796 - .type = VID_TYPE_CAPTURE, 797 796 .fops = &vicam_fops, 798 797 .minor = -1, 799 798 };
-3
drivers/media/video/usbvision/usbvision-video.c
··· 1405 1405 }; 1406 1406 1407 1407 static struct video_device usbvision_video_template = { 1408 - .type = VID_TYPE_TUNER | VID_TYPE_CAPTURE, 1409 1408 .fops = &usbvision_fops, 1410 1409 .ioctl_ops = &usbvision_ioctl_ops, 1411 1410 .name = "usbvision-video", ··· 1442 1443 }; 1443 1444 1444 1445 static struct video_device usbvision_radio_template = { 1445 - .type = VID_TYPE_TUNER, 1446 1446 .fops = &usbvision_radio_fops, 1447 1447 .name = "usbvision-radio", 1448 1448 .release = video_device_release, ··· 1464 1466 1465 1467 static struct video_device usbvision_vbi_template= 1466 1468 { 1467 - .type = VID_TYPE_TUNER, 1468 1469 .fops = &usbvision_vbi_fops, 1469 1470 .release = video_device_release, 1470 1471 .name = "usbvision-vbi",
-2
drivers/media/video/uvc/uvc_driver.c
··· 1459 1459 * get another one. 1460 1460 */ 1461 1461 vdev->parent = &dev->intf->dev; 1462 - vdev->type = 0; 1463 - vdev->type2 = 0; 1464 1462 vdev->minor = -1; 1465 1463 vdev->fops = &uvc_fops; 1466 1464 vdev->release = video_device_release;
+1
drivers/media/video/v4l2-dev.c
··· 302 302 } 303 303 } 304 304 video_device[i] = vfd; 305 + vfd->vfl_type = type; 305 306 vfd->minor = i; 306 307 307 308 ret = get_index(vfd, index);
-2
drivers/media/video/vino.c
··· 4385 4385 4386 4386 static struct video_device v4l_device_template = { 4387 4387 .name = "NOT SET", 4388 - /*.type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE | */ 4389 - /* VID_TYPE_CLIPPING | VID_TYPE_SCALES, VID_TYPE_OVERLAY */ 4390 4388 .fops = &vino_fops, 4391 4389 .minor = -1, 4392 4390 };
-1
drivers/media/video/vivi.c
··· 1092 1092 1093 1093 static struct video_device vivi_template = { 1094 1094 .name = "vivi", 1095 - .type = VID_TYPE_CAPTURE, 1096 1095 .fops = &vivi_fops, 1097 1096 .ioctl_ops = &vivi_ioctl_ops, 1098 1097 .minor = -1,
-1
drivers/media/video/w9966.c
··· 197 197 }; 198 198 static struct video_device w9966_template = { 199 199 .name = W9966_DRIVERNAME, 200 - .type = VID_TYPE_CAPTURE | VID_TYPE_SCALES, 201 200 .fops = &w9966_fops, 202 201 }; 203 202
-1
drivers/media/video/w9968cf.c
··· 3550 3550 } 3551 3551 3552 3552 strcpy(cam->v4ldev->name, symbolic(camlist, mod_id)); 3553 - cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; 3554 3553 cam->v4ldev->fops = &w9968cf_fops; 3555 3554 cam->v4ldev->minor = video_nr[dev_nr]; 3556 3555 cam->v4ldev->release = video_device_release;
-1
drivers/media/video/zc0301/zc0301_core.c
··· 1985 1985 } 1986 1986 1987 1987 strcpy(cam->v4ldev->name, "ZC0301[P] PC Camera"); 1988 - cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; 1989 1988 cam->v4ldev->fops = &zc0301_fops; 1990 1989 cam->v4ldev->minor = video_nr[dev_nr]; 1991 1990 cam->v4ldev->release = video_device_release;
-2
drivers/media/video/zoran_driver.c
··· 4644 4644 4645 4645 struct video_device zoran_template __devinitdata = { 4646 4646 .name = ZORAN_NAME, 4647 - .type = ZORAN_VID_TYPE, 4648 - .type2 = ZORAN_V4L2_VID_FLAGS, 4649 4647 .fops = &zoran_fops, 4650 4648 .release = &zoran_vdev_release, 4651 4649 .minor = -1
-1
drivers/media/video/zr364xx.c
··· 780 780 781 781 static struct video_device zr364xx_template = { 782 782 .name = DRIVER_DESC, 783 - .type = VID_TYPE_CAPTURE, 784 783 .fops = &zr364xx_fops, 785 784 .ioctl_ops = &zr364xx_ioctl_ops, 786 785 .release = video_device_release,
+1 -2
include/media/v4l2-dev.h
··· 53 53 54 54 /* device info */ 55 55 char name[32]; 56 - int type; /* v4l1 */ 57 - int type2; /* v4l2 */ 56 + int vfl_type; 58 57 int minor; 59 58 /* attribute to diferentiate multiple indexs on one physical device */ 60 59 int index;
-1
sound/i2c/other/tea575x-tuner.c
··· 190 190 191 191 memset(&tea->vd, 0, sizeof(tea->vd)); 192 192 strcpy(tea->vd.name, tea->tea5759 ? "TEA5759 radio" : "TEA5757 radio"); 193 - tea->vd.type = VID_TYPE_TUNER; 194 193 tea->vd.release = snd_tea575x_release; 195 194 video_set_drvdata(&tea->vd, tea); 196 195 tea->vd.fops = &tea->fops;