diff mbox series

[2/2] kernel / reboot: Remove the pm_power_off_prepare hook

Message ID df32f53cefe604a5ae67c4b0e6eef4d5e69abc6b.1521631678.git.baolin.wang@linaro.org
State New
Headers show
Series None | expand

Commit Message

(Exiting) Baolin Wang March 21, 2018, 11:30 a.m. UTC
There are no users will prepare to power off system by 'pm_power_off_prepare'
hook, thus we can remove it now.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

---
 include/linux/pm.h |    1 -
 kernel/reboot.c    |    8 --------
 2 files changed, 9 deletions(-)

-- 
1.7.9.5
diff mbox series

Patch

diff --git a/include/linux/pm.h b/include/linux/pm.h
index e723b78..cff7668 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -32,7 +32,6 @@ 
  * Callbacks for platform drivers to implement.
  */
 extern void (*pm_power_off)(void);
-extern void (*pm_power_off_prepare)(void);
 
 struct device; /* we have a circular dep with device.h */
 #ifdef CONFIG_VT_CONSOLE_SLEEP
diff --git a/kernel/reboot.c b/kernel/reboot.c
index e4ced88..6667b63 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -44,12 +44,6 @@ 
 enum reboot_type reboot_type = BOOT_ACPI;
 int reboot_force;
 
-/*
- * If set, this is used for preparing the system to power off.
- */
-
-void (*pm_power_off_prepare)(void);
-
 /**
  *	emergency_restart - reboot the system
  *
@@ -284,8 +278,6 @@  void kernel_halt(void)
 void kernel_power_off(void)
 {
 	kernel_shutdown_prepare(SYSTEM_POWER_OFF);
-	if (pm_power_off_prepare)
-		pm_power_off_prepare();
 	migrate_to_reboot_cpu();
 	syscore_shutdown();
 	pr_emerg("Power down\n");