kernel/reboot: Add stub for pm_power_off
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Mon, 9 May 2022 23:32:14 +0000 (02:32 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 19 May 2022 17:30:30 +0000 (19:30 +0200)
Add weak stub for the global pm_power_off callback variable. This will
allow us to remove pm_power_off definitions from arch/ code and transition
to the new sys-off based API that will replace the global variable.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/reboot.c

index 892d25a..7723aff 100644 (file)
@@ -57,6 +57,12 @@ struct sys_off_handler {
        void *list;
 };
 
+/*
+ * Temporary stub that prevents linkage failure while we're in process
+ * of removing all uses of legacy pm_power_off() around the kernel.
+ */
+void __weak (*pm_power_off)(void);
+
 /*
  * If set, this is used for preparing the system to power off.
  */