aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index a1dcceb7b2c0..efbc877c6181 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1826,6 +1826,10 @@ static int em28xx_v4l2_open(struct file *filp)
1826 case VFL_TYPE_VBI: 1826 case VFL_TYPE_VBI:
1827 fh_type = V4L2_BUF_TYPE_VBI_CAPTURE; 1827 fh_type = V4L2_BUF_TYPE_VBI_CAPTURE;
1828 break; 1828 break;
1829 case VFL_TYPE_RADIO:
1830 break;
1831 default:
1832 return -EINVAL;
1829 } 1833 }
1830 1834
1831 em28xx_videodbg("open dev=%s type=%s users=%d\n", 1835 em28xx_videodbg("open dev=%s type=%s users=%d\n",
@@ -1846,15 +1850,17 @@ static int em28xx_v4l2_open(struct file *filp)
1846 fh->type = fh_type; 1850 fh->type = fh_type;
1847 filp->private_data = fh; 1851 filp->private_data = fh;
1848 1852
1849 if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE && dev->users == 0) { 1853 if (dev->users == 0) {
1850 em28xx_set_mode(dev, EM28XX_ANALOG_MODE); 1854 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
1851 em28xx_resolution_set(dev);
1852 1855
1853 /* Needed, since GPIO might have disabled power of 1856 if (vdev->vfl_type != VFL_TYPE_RADIO)
1854 some i2c device 1857 em28xx_resolution_set(dev);
1858
1859 /*
1860 * Needed, since GPIO might have disabled power
1861 * of some i2c devices
1855 */ 1862 */
1856 em28xx_wake_i2c(dev); 1863 em28xx_wake_i2c(dev);
1857
1858 } 1864 }
1859 1865
1860 if (vdev->vfl_type == VFL_TYPE_RADIO) { 1866 if (vdev->vfl_type == VFL_TYPE_RADIO) {