[PATCH] PM / s2idle: Export s2idle_set_ops

Claude Yen claude.yen at mediatek.com
Thu Oct 22 02:17:48 EDT 2020


As suspend_set_ops is exported in commit a5e4fd8783a2
("PM / Suspend: Export suspend_set_ops, suspend_valid_only_mem"),
exporting s2idle_set_ops to make kernel module setup s2idle ops too.

In this way, kernel module can hook platform suspend
functions regardless of Suspend-to-Ram(S2R) or
Suspend-to-Idle(S2I)

Signed-off-by: Claude Yen <claude.yen at mediatek.com>
---
 kernel/power/suspend.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 8b1bb5ee7e5d..0dc3e8344318 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -79,6 +79,7 @@ void s2idle_set_ops(const struct platform_s2idle_ops *ops)
 	s2idle_ops = ops;
 	unlock_system_sleep();
 }
+EXPORT_SYMBOL_GPL(s2idle_set_ops);
 
 static void s2idle_begin(void)
 {
-- 
2.18.0


More information about the Linux-mediatek mailing list