summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJiukai Ma <jiukaim@nvidia.com>2014-02-13 13:37:35 +0000
committerMitch Luban <mluban@nvidia.com>2014-02-27 10:38:44 -0800
commitf2a71e3dcf47f4c267fa21addbda8189aa69aa9e (patch)
tree80167a7dcc23d30227e08c84ad2c12f58dbd8e11 /drivers
parent9f67b98eba1abf87f8cc2eb5c26f6204456c3c26 (diff)
driver: media: tegra: Update the power state.
bug 1457201 Update the power state when powe on. Or it will cause power off failure. For instance, when the first time invoking ov5693_pm_wr to set the pwr_dev to 2, the second time to power off ov5693 will be failure if the ov5693 is already on but not updating the power state. Change-Id: I5f307b302d7f4d7afae6e900a84103f4b36e2605 Signed-off-by: Jiukai Ma <jiukaim@nvidia.com> Reviewed-on: http://git-master/r/367196 (cherry picked from commit cce945356e91b5c74eb82644a6277932f5074413) Reviewed-on: http://git-master/r/375513 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: Mitch Luban <mluban@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/tegra/ov5693.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/tegra/ov5693.c b/drivers/media/platform/tegra/ov5693.c
index 6d25c47ee88b..c90fa1847f1b 100644
--- a/drivers/media/platform/tegra/ov5693.c
+++ b/drivers/media/platform/tegra/ov5693.c
@@ -2663,8 +2663,10 @@ static int ov5693_power_on(struct ov5693_info *info, bool standby)
if (info->pdata && info->pdata->power_on) {
err = info->pdata->power_on(pw);
- if (err >= 0)
+ if (err >= 0) {
info->power_on = true;
+ info->pwr_dev = NVC_PWR_ON;
+ }
} else {
dev_err(&info->i2c_client->dev,
"%s ERR: has no power_on function\n", __func__);