[media] em28xx-v4l: do not call em28xx_init_camera() if the device has no sensor
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Fri, 17 Jan 2014 17:45:32 +0000 (14:45 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 4 Feb 2014 18:41:21 +0000 (16:41 -0200)
This avoids the unnecessary temporary registration of a dummy V4L2 clock.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-video.c

index 09e18da0b5cd50bb9af4a51f45daec6722d3a9fe..2775c9062c0adb8ff3d6520ed8a209451352815f 100644 (file)
@@ -2273,7 +2273,8 @@ static int em28xx_v4l2_init(struct em28xx *dev)
        }
 
        em28xx_tuner_setup(dev);
-       em28xx_init_camera(dev);
+       if (dev->em28xx_sensor != EM28XX_NOSENSOR)
+               em28xx_init_camera(dev);
 
        /* Configure audio */
        ret = em28xx_audio_setup(dev);