m68k: Switch to new sys-off handler API
authorDmitry Osipenko <digetx@gmail.com>
Sun, 30 Jan 2022 23:37:09 +0000 (02:37 +0300)
committerHector Martin <marcan@marcan.st>
Sat, 19 Feb 2022 08:06:40 +0000 (17:06 +0900)
commit6c5db9360016d0bd5d809735233435c2390d4e78
tree1a48f56113fbc0ad91f551ec587b030a2edff933
parenta563cfdfc5a6b7706fedd32faf6256acf9d0c331
m68k: Switch to new sys-off handler API

Kernel now supports chained power-off handlers. Use
register_power_off_handler() that registers power-off handlers and
do_kernel_power_off() that invokes chained power-off handlers. Legacy
pm_power_off() will be removed once all drivers will be converted to
the new power-off API.

Normally arch code should adopt only the do_kernel_power_off() at first,
but m68k is a special case because it uses pm_power_off() "inside out",
i.e. pm_power_off() invokes machine_power_off() [in fact it does nothing],
while it's machine_power_off() that should invoke the pm_power_off(), and
thus, we can't convert platforms to the new API separately. There are only
two platforms changed here, so it's not a big deal.

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
arch/m68k/emu/natfeat.c
arch/m68k/include/asm/machdep.h
arch/m68k/kernel/process.c
arch/m68k/kernel/setup_mm.c
arch/m68k/kernel/setup_no.c
arch/m68k/mac/config.c