aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-05-10 17:10:13 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2010-05-10 17:10:13 -0400
commit543f2503a956601dd490c6cde0ebf6adb4653e50 (patch)
treed8092f7a19d8d219d75a659e2f7ad09d2ff08d7a /drivers/base/platform.c
parent2f60ba706bd9af84c4eab704243b262e69556f2e (diff)
PM / platform_bus: Allow runtime PM by default
Currently the default runtime PM callbacks for platform devices return -ENOSYS, preventing the use of runtime PM platforms until they have provided at least a default implementation. This hinders the use of runtime PM by devices which work with many platforms such as memory mapped devices, MFDs and on chip IPs shared by multiple architectures. Change the default implementation to the standard pm_generic_runtime one, allowing drivers to use runtime PM without per-architecture changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 4b4b565c835f..a6c07797c88e 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct device *dev)
967 967
968int __weak platform_pm_runtime_suspend(struct device *dev) 968int __weak platform_pm_runtime_suspend(struct device *dev)
969{ 969{
970 return -ENOSYS; 970 return pm_generic_runtime_suspend(dev);
971}; 971};
972 972
973int __weak platform_pm_runtime_resume(struct device *dev) 973int __weak platform_pm_runtime_resume(struct device *dev)
974{ 974{
975 return -ENOSYS; 975 return pm_generic_runtime_resume(dev);
976}; 976};
977 977
978int __weak platform_pm_runtime_idle(struct device *dev) 978int __weak platform_pm_runtime_idle(struct device *dev)
979{ 979{
980 return -ENOSYS; 980 return pm_generic_runtime_idle(dev);
981}; 981};
982 982
983#else /* !CONFIG_PM_RUNTIME */ 983#else /* !CONFIG_PM_RUNTIME */