diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index fcfc7413f74c..49ab0629702e 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -1845,7 +1845,6 @@ static const struct v4l2_ioctl_ops radio_ioctl_ops = { | |||
1845 | 1845 | ||
1846 | static struct video_device em28xx_radio_template = { | 1846 | static struct video_device em28xx_radio_template = { |
1847 | .name = "em28xx-radio", | 1847 | .name = "em28xx-radio", |
1848 | .type = VID_TYPE_TUNER, | ||
1849 | .fops = &radio_fops, | 1848 | .fops = &radio_fops, |
1850 | .ioctl_ops = &radio_ioctl_ops, | 1849 | .ioctl_ops = &radio_ioctl_ops, |
1851 | .minor = -1, | 1850 | .minor = -1, |
@@ -1891,7 +1890,6 @@ EXPORT_SYMBOL(em28xx_unregister_extension); | |||
1891 | 1890 | ||
1892 | static struct video_device *em28xx_vdev_init(struct em28xx *dev, | 1891 | static struct video_device *em28xx_vdev_init(struct em28xx *dev, |
1893 | const struct video_device *template, | 1892 | const struct video_device *template, |
1894 | const int type, | ||
1895 | const char *type_name) | 1893 | const char *type_name) |
1896 | { | 1894 | { |
1897 | struct video_device *vfd; | 1895 | struct video_device *vfd; |
@@ -1903,7 +1901,6 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev, | |||
1903 | vfd->minor = -1; | 1901 | vfd->minor = -1; |
1904 | vfd->parent = &dev->udev->dev; | 1902 | vfd->parent = &dev->udev->dev; |
1905 | vfd->release = video_device_release; | 1903 | vfd->release = video_device_release; |
1906 | vfd->type = type; | ||
1907 | vfd->debug = video_debug; | 1904 | vfd->debug = video_debug; |
1908 | 1905 | ||
1909 | snprintf(vfd->name, sizeof(vfd->name), "%s %s", | 1906 | snprintf(vfd->name, sizeof(vfd->name), "%s %s", |
@@ -1981,14 +1978,11 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, | |||
1981 | list_add_tail(&dev->devlist, &em28xx_devlist); | 1978 | list_add_tail(&dev->devlist, &em28xx_devlist); |
1982 | 1979 | ||
1983 | /* allocate and fill video video_device struct */ | 1980 | /* allocate and fill video video_device struct */ |
1984 | dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, | 1981 | dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video"); |
1985 | VID_TYPE_CAPTURE, "video"); | ||
1986 | if (NULL == dev->vdev) { | 1982 | if (NULL == dev->vdev) { |
1987 | em28xx_errdev("cannot allocate video_device.\n"); | 1983 | em28xx_errdev("cannot allocate video_device.\n"); |
1988 | goto fail_unreg; | 1984 | goto fail_unreg; |
1989 | } | 1985 | } |
1990 | if (dev->tuner_type != TUNER_ABSENT) | ||
1991 | dev->vdev->type |= VID_TYPE_TUNER; | ||
1992 | 1986 | ||
1993 | /* register v4l2 video video_device */ | 1987 | /* register v4l2 video video_device */ |
1994 | retval = video_register_device(dev->vdev, VFL_TYPE_GRABBER, | 1988 | 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, | |||
2000 | } | 1994 | } |
2001 | 1995 | ||
2002 | /* Allocate and fill vbi video_device struct */ | 1996 | /* Allocate and fill vbi video_device struct */ |
2003 | dev->vbi_dev = em28xx_vdev_init(dev, &em28xx_video_template, | 1997 | dev->vbi_dev = em28xx_vdev_init(dev, &em28xx_video_template, "vbi"); |
2004 | VFL_TYPE_VBI, "vbi"); | ||
2005 | /* register v4l2 vbi video_device */ | 1998 | /* register v4l2 vbi video_device */ |
2006 | if (video_register_device(dev->vbi_dev, VFL_TYPE_VBI, | 1999 | if (video_register_device(dev->vbi_dev, VFL_TYPE_VBI, |
2007 | vbi_nr[dev->devno]) < 0) { | 2000 | vbi_nr[dev->devno]) < 0) { |
@@ -2011,8 +2004,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, | |||
2011 | } | 2004 | } |
2012 | 2005 | ||
2013 | if (em28xx_boards[dev->model].radio.type == EM28XX_RADIO) { | 2006 | if (em28xx_boards[dev->model].radio.type == EM28XX_RADIO) { |
2014 | dev->radio_dev = em28xx_vdev_init(dev, &em28xx_radio_template, | 2007 | dev->radio_dev = em28xx_vdev_init(dev, &em28xx_radio_template, "radio"); |
2015 | VFL_TYPE_RADIO, "radio"); | ||
2016 | if (NULL == dev->radio_dev) { | 2008 | if (NULL == dev->radio_dev) { |
2017 | em28xx_errdev("cannot allocate video_device.\n"); | 2009 | em28xx_errdev("cannot allocate video_device.\n"); |
2018 | goto fail_unreg; | 2010 | goto fail_unreg; |