Skip to content

RFC kernel: Drop pm_poweroff_prepare

Guenter Roeck linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2acpi: Use syscore instead of pm_power_off_prepare to prepare for poweroffdrivers/acpi/sleep.c+16 -54 replies
2/2kernel: power: Drop pm_poweroff_prepareinclude/linux/pm.h kernel/reboot.c+0 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] kernel: Drop pm_poweroff_prepare

While working on the poweroff handler implementation, I also started looking into pm_power_off_prepare. Ultimately, I concluded that it is not really necessary, and that it would be easy to remove.

The first patch in this series converts acpi to use a syscore callback instead of setting pm_power_off_prepare. Since acpi is the only user of pm_power_off_prepare, it is no longer used and removed with the second patch.

Removing pm_power_off_prepare streamlines poweroff handling and makes it more uniform, so I think its removal would be worthwhile to consider.

I am sending the series as RFC since I am not sure if I may be missing something. Compile tested only at this time; I'll do more testing if this sounds like a reasonable thing to do.

On a side note, I don't see any callers of acpi_suspend(). I actually removed it as an experiment, and at least x86_64:allmodconfig still compiles. Can it be removed ?