]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
drivers: camera: Fix power on function calls
authorFrank Chen <frankc@nvidia.com>
Tue, 2 Aug 2016 22:09:01 +0000 (15:09 -0700)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 5 Aug 2016 06:23:15 +0000 (23:23 -0700)
Since sensor and forcuser has the same V4L2 group id,
when device s_power callback is called, the power_on
function of sensor and foucser will both be called,
even though only one of them needs to be powered on.

Switched to subdev s_power call to power on either
sensor or focuser, instead of both of them.

Bug 1792264

Change-Id: Iacae6ab92ec931cced28073589e82109b037a840
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1196342
(cherry picked from commit d67aaad60ae73c78950a403c86851ac7f81aef61)
Reviewed-on: http://git-master/r/1197577
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Tested-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
drivers/media/platform/tegra/camera/channel.c

index 468b2f2cfca7c2840c1f729b3564c5b8cfc53ec4..7e95ac1e62add6050cc42221ebc5c7eff99098df 100644 (file)
@@ -819,8 +819,7 @@ static int tegra_channel_set_stream(struct tegra_channel *chan, bool on)
 
 static int tegra_channel_set_power(struct tegra_channel *chan, bool on)
 {
-       return v4l2_device_call_until_err(chan->video.v4l2_dev,
-                       chan->grp_id, core, s_power, on);
+       return v4l2_subdev_call(chan->subdev_on_csi, core, s_power, on);
 }
 
 static int update_clk(struct tegra_mc_vi *vi)