summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorPetr Cvek <petr.cvek@tul.cz>2017-04-24 22:51:58 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-05-18 07:29:57 -0300
commite3b4d10cc057522353c4a02f2f90dca6a52e006f (patch)
treea91e79f1c0aca4384c055baf8474db1e90cf2061 /drivers/media/usb
parent71e22ed1e22ff4bd83ed9743083cc8381ada1702 (diff)
downloadblackbird-op-linux-e3b4d10cc057522353c4a02f2f90dca6a52e006f.tar.gz
blackbird-op-linux-e3b4d10cc057522353c4a02f2f90dca6a52e006f.zip
[media] pxa_camera: fix module remove codepath for v4l2 clock
The conversion from soc_camera omitted a correct handling of the clock gating for a sensor. When the pxa_camera driver module was removed it tried to unregister clk, but this caused a similar warning: WARNING: CPU: 0 PID: 6740 at drivers/media/v4l2-core/v4l2-clk.c:278 v4l2_clk_unregister(): Refusing to unregister ref-counted 0-0030 clock! The clock was at time still refcounted by the sensor driver. Before the removing of the pxa_camera the clock must be dropped by the sensor driver. This should be triggered by v4l2_async_notifier_unregister() call which removes sensor driver module too, calls unbind() function and then tries to probe sensor driver again. Inside unbind() we can safely unregister the v4l2 clock as the sensor driver got removed. The original v4l2_clk_unregister() should be put inside test as the clock can be already unregistered from unbind(). If there was not any bound sensor the clock is still present. The codepath is practically a copy from the old soc_camera. The bug was tested with a pxa_camera+ov9640 combination during the conversion of the ov9640 from the soc_camera. Signed-off-by: Petr Cvek <petr.cvek@tul.cz> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud