diff mbox

ARM: mach-shmobile: Runtime PM prototype

Message ID Pine.LNX.4.64.1007072226430.22987@axis700.grange (mailing list archive)
State Superseded
Headers show

Commit Message

Guennadi Liakhovetski July 7, 2010, 8:28 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-shmobile/pm_runtime.c b/arch/arm/mach-shmobile/pm_runtime.c
index 93950dc..4036269 100644
--- a/arch/arm/mach-shmobile/pm_runtime.c
+++ b/arch/arm/mach-shmobile/pm_runtime.c
@@ -40,20 +40,27 @@  static void platform_pm_init_bug(struct platform_device *pdev)
 int platform_pm_runtime_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
+	int ret;
 
 	dev_dbg(dev, "platform_pm_runtime_suspend()\n");
 
 	platform_pm_init_bug(pdev);
 
+	if (dev->driver && dev->driver->pm && dev->driver->pm->runtime_suspend)
+		ret = dev->driver->pm->runtime_suspend(dev);
+	else
+		ret = 0;
+
 	if (pdev->archdata.clk)
 		clk_disable(pdev->archdata.clk);
 
-	return 0;
+	return ret;
 }
 
 int platform_pm_runtime_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
+	int ret;
 
 	dev_dbg(dev, "platform_pm_runtime_resume()\n");
 
@@ -62,7 +69,12 @@  int platform_pm_runtime_resume(struct device *dev)
 	if (pdev->archdata.clk)
 		clk_enable(pdev->archdata.clk);
 
-	return 0;
+	if (dev->driver && dev->driver->pm && dev->driver->pm->runtime_resume)
+		ret = dev->driver->pm->runtime_resume(dev);
+	else
+		ret = 0;
+
+	return ret;
 }
 
 int platform_pm_runtime_idle(struct device *dev)