diff options
author | Bhushan Rupde <brupde@nvidia.com> | 2016-05-13 14:30:19 +0530 |
---|---|---|
committer | Winnie Hsu <whsu@nvidia.com> | 2016-05-26 22:57:35 -0700 |
commit | 8b409a3da4069a6c3831e7fa1f847fd86d800353 (patch) | |
tree | 522c9f64ba62091823b08f8f867935754a538083 /drivers | |
parent | 58e3084c00ca7b7ae59f906bb4e1948b0f1e291f (diff) |
platform: tegra: nvavp: fix for pre-decrement of clk_enabled cntr
Bug 1729847
Change-Id: Ie455b0469a1d4e35453ca9e36c5e90dfdc6f56a2
Signed-off-by: Bhushan Rupde <brupde@nvidia.com>
Reviewed-on: http://git-master/r/1147432
Reviewed-by: Mohan Nimaje <mnimaje@nvidia.com>
Reviewed-by: Soumen Dey <sdey@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/tegra/nvavp/nvavp_dev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/tegra/nvavp/nvavp_dev.c b/drivers/media/platform/tegra/nvavp/nvavp_dev.c index 4ca6d3069d3f..843ea338c949 100644 --- a/drivers/media/platform/tegra/nvavp/nvavp_dev.c +++ b/drivers/media/platform/tegra/nvavp/nvavp_dev.c @@ -567,7 +567,10 @@ static void nvavp_clks_enable(struct nvavp_info *nvavp) static void nvavp_clks_disable(struct nvavp_info *nvavp) { - if ((--nvavp->clk_enabled == 0) && !nvavp->stay_on) { + if (nvavp->clk_enabled) { + nvavp->clk_enabled--; + } + if ((nvavp->clk_enabled == 0) && !nvavp->stay_on) { clk_disable_unprepare(nvavp->bsev_clk); clk_disable_unprepare(nvavp->vde_clk); clk_set_rate(nvavp->emc_clk, 0); |