video: host: remove pm_runtime_put in deinit
Bryan Wu [Fri, 3 Jan 2014 18:42:53 +0000 (10:42 -0800)]
commit 813e42b9ba004632970153d645107d060018b79c add a WARN_ON for
unbalanced PM usage_cnt operation. When removing nvhost_vi module
from kernel, warning pops up.

nvhost_module_init() forgets to call pm_runtime_get() while
nvhost_module_deinit() calls pm_runtime_put(). So adding back
pm_runtime_get() will cause host1x suspend failure, just removing
pm_runtime_put() solve this issue.

Bug 1421146
Bug 1434667

Change-Id: Ia2a4002955d4e2e7a74aae2c4ee8c8d88ac71790
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/351832
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

drivers/video/tegra/host/nvhost_acm.c

index 89261e8..d1f81ea 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Tegra Graphics Host Automatic Clock Management
  *
- * Copyright (c) 2010-2013, NVIDIA Corporation. All rights reserved.
+ * Copyright (c) 2010-2014, NVIDIA Corporation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -621,10 +621,8 @@ void nvhost_module_deinit(struct platform_device *dev)
 
        if (!pm_runtime_enabled(&dev->dev))
                nvhost_module_disable_clk(&dev->dev);
-       else {
-               pm_runtime_put(&dev->dev);
+       else
                pm_runtime_disable(&dev->dev);
-       }
 
        nvhost_module_suspend(&dev->dev);
        for (i = 0; i < pdata->num_clks; i++)