video: tegra: host: Fix vic and gk20a runtime pm
Terje Bergstrom [Thu, 20 Jun 2013 08:13:58 +0000 (11:13 +0300)]
nvhost pm support was refactored to reduce duplicated code. Adjust
VIC and gk20a code to work again.

Change-Id: Ie4708c6d28b07445cc6b3176f35d2da1de5010f5
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/241909
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/video/tegra/host/gk20a/gk20a.c
drivers/video/tegra/host/vic03/vic03.c

index 9a09618..33a5498 100644 (file)
@@ -790,12 +790,12 @@ static int gk20a_powergate(struct generic_pm_domain *domain)
 
 static int gk20a_enable_clock(struct device *dev)
 {
-       return nvhost_module_enable_clk(to_platform_device(dev));
+       return nvhost_module_enable_clk(dev);
 }
 
 static int gk20a_disable_clock(struct device *dev)
 {
-       return nvhost_module_disable_clk(to_platform_device(dev));
+       return nvhost_module_disable_clk(dev);
 }
 
 static int gk20a_save_context(struct device *dev)
@@ -838,7 +838,7 @@ static int gk20a_restore_context(struct device *dev)
 
 static int gk20a_suspend(struct device *dev)
 {
-       return nvhost_client_device_suspend(to_platform_device(dev));
+       return nvhost_client_device_suspend(dev);
 }
 
 static int gk20a_resume(struct device *dev)
index 60a6a6f..6f7a414 100644 (file)
@@ -623,12 +623,12 @@ static int vic03_powergate(struct generic_pm_domain *domain)
 
 static int vic03_enable_clock(struct device *dev)
 {
-       return nvhost_module_enable_clk(to_platform_device(dev));
+       return nvhost_module_enable_clk(dev);
 }
 
 static int vic03_disable_clock(struct device *dev)
 {
-       return nvhost_module_disable_clk(to_platform_device(dev));
+       return nvhost_module_disable_clk(dev);
 }
 
 static int vic03_restore_context(struct device *dev)
@@ -652,7 +652,7 @@ static int vic03_restore_context(struct device *dev)
 
 static int vic03_suspend(struct device *dev)
 {
-       return nvhost_client_device_suspend(to_platform_device(dev));
+       return nvhost_client_device_suspend(dev);
 }
 
 static int vic03_resume(struct device *dev)