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>
Tue, 8 Feb 2022 05:49:05 +0000 (14:49 +0900)
commitddd31d870caa0034b5b55fb5b2fceff7f4ec553b
tree51ed0279085d317abb8da64aaedb64124b915578
parent3c198df9a44ac0fd9d5c8750b4f9b072bef3e30f
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