Skip to content

Commit 543f250

Browse files
broonierjwysocki
authored andcommitted
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 <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 2f60ba7 commit 543f250

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/base/platform.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct device *dev)
967967

968968
int __weak platform_pm_runtime_suspend(struct device *dev)
969969
{
970-
return -ENOSYS;
970+
return pm_generic_runtime_suspend(dev);
971971
};
972972

973973
int __weak platform_pm_runtime_resume(struct device *dev)
974974
{
975-
return -ENOSYS;
975+
return pm_generic_runtime_resume(dev);
976976
};
977977

978978
int __weak platform_pm_runtime_idle(struct device *dev)
979979
{
980-
return -ENOSYS;
980+
return pm_generic_runtime_idle(dev);
981981
};
982982

983983
#else /* !CONFIG_PM_RUNTIME */

0 commit comments

Comments
 (0)