m68k: Switch to new sys-off handler API
authorDmitry Osipenko <digetx@gmail.com>
Sun, 30 Jan 2022 23:37:09 +0000 (02:37 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Mar 2022 17:52:35 +0000 (10:52 -0700)
commit8bc248b193379f6ea4ea6840080bcfee248b7f9d
tree56254c05a7d41eb6dd437d21ec3fe310c8a6c01c
parent3b92a63e1b8d4b56d3e6b3a75bedea22044dff5a
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