Skip to content

Commit 5b71808

Browse files
digetxrafaeljw
authored andcommitted
reboot: Remove pm_power_off_prepare()
All pm_power_off_prepare() users were converted to sys-off handler API. Remove the obsolete global callback variable. Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 02a1124 commit 5b71808

2 files changed

Lines changed: 0 additions & 20 deletions

File tree

include/linux/pm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
* Callbacks for platform drivers to implement.
2222
*/
2323
extern void (*pm_power_off)(void);
24-
extern void (*pm_power_off_prepare)(void);
2524

2625
struct device; /* we have a circular dep with device.h */
2726
#ifdef CONFIG_VT_CONSOLE_SLEEP

kernel/reboot.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,6 @@ struct sys_off_handler {
6363
*/
6464
void __weak (*pm_power_off)(void);
6565

66-
/*
67-
* If set, this is used for preparing the system to power off.
68-
*/
69-
70-
void (*pm_power_off_prepare)(void);
71-
EXPORT_SYMBOL_GPL(pm_power_off_prepare);
72-
7366
/**
7467
* emergency_restart - reboot the system
7568
*
@@ -524,14 +517,6 @@ void unregister_platform_power_off(void (*power_off)(void))
524517
}
525518
EXPORT_SYMBOL_GPL(unregister_platform_power_off);
526519

527-
static int legacy_pm_power_off_prepare(struct sys_off_data *data)
528-
{
529-
if (pm_power_off_prepare)
530-
pm_power_off_prepare();
531-
532-
return NOTIFY_DONE;
533-
}
534-
535520
static int legacy_pm_power_off(struct sys_off_data *data)
536521
{
537522
if (pm_power_off)
@@ -549,10 +534,6 @@ static int legacy_pm_power_off(struct sys_off_data *data)
549534
*/
550535
static int __init legacy_pm_init(void)
551536
{
552-
register_sys_off_handler(SYS_OFF_MODE_POWER_OFF_PREPARE,
553-
SYS_OFF_PRIO_DEFAULT,
554-
legacy_pm_power_off_prepare, NULL);
555-
556537
register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_DEFAULT,
557538
legacy_pm_power_off, NULL);
558539

0 commit comments

Comments
 (0)