Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media: ov7670: don't access registers when the device is powered off
Since commit 3d6a8fe ("media: ov7670: hook s_power onto v4l2 core"), the device is actually powered off while the video stream is stopped. So now set_format and s_frame_interval could be called while the device is powered off, but these callbacks try to change the register settings at this time. The frame format and framerate will be restored right after power-up, so we can just postpone applying these changes at these callbacks if the device is not powered up. Fixes: 3d6a8fe ("media: ov7670: hook s_power onto v4l2 core") Cc: Jonathan Corbet <[email protected]> Signed-off-by: Akinobu Mita <[email protected]> Reviewed-by: Lubomir Rintel <[email protected]> Tested-by: Lubomir Rintel <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
- Loading branch information