]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: balance pm_runtime calls
authorShridhar Rasal <srasal@nvidia.com>
Mon, 17 Feb 2014 13:04:07 +0000 (18:34 +0530)
committerSachin Nikam <snikam@nvidia.com>
Mon, 19 May 2014 11:38:58 +0000 (04:38 -0700)
pm_runtime_get_sync increments usage count first and
then carry out actual resume operation. if pm_runtime_get_sync
failed needs to decrement usage count to balance count.

Bug 1459733

Change-Id: I844c59310b992c7cac12b134c772f30857c5dec3
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/368416
Reviewed-on: http://git-master/r/411248
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
drivers/video/tegra/host/nvhost_acm.c

index 3c92624fc6ae7144e81299a4714fb6498c04c15d..b85426320a77b9a625e17bf4de87dd93bbb1e7d5 100644 (file)
@@ -169,6 +169,7 @@ int nvhost_module_busy(struct platform_device *dev)
 #ifdef CONFIG_PM_RUNTIME
        ret = pm_runtime_get_sync(&dev->dev);
        if (ret < 0) {
+               pm_runtime_put_noidle(&dev->dev);
                if (dev->dev.parent && (dev->dev.parent != &platform_bus))
                        nvhost_module_idle(nvhost_get_parent(dev));
                nvhost_err(&dev->dev, "failed to power on, err %d", ret);