[media] V4L2: em28xx: tell the ov2640 driver to balance clock enabling internally
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Mon, 21 Oct 2013 09:28:06 +0000 (06:28 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 31 Oct 2013 06:39:13 +0000 (04:39 -0200)
commitbe353fa188eed6731910ffd35135703eb032cff1
tree352e262dcc4f8561472a16af0a06856a365e6d59
parent40f075330adfa497cc2894f9c6a32bb99c5cd5b8
[media] V4L2: em28xx: tell the ov2640 driver to balance clock enabling internally

The em28xx driver only calls subdevices' .s_power() method to power them
down, relying on the hardware to wake up automatically, which is usually
the case with tuners. This was acceptable with the old .standby() method,
but is wrong with .s_power(). Fixing the driver would be difficult due to
a broad supported hardware base. Instead this patch makes use of the
unbalanced_power soc-camera subdevice flag to tell the ov2640 driver to
balance calls to v4l2_clk_enable() and v4l2_clk_disable() internally.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-camera.c