m68k: Switch to new sys-off handler API
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Mon, 9 May 2022 23:32:24 +0000 (02:32 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 19 May 2022 17:30:30 +0000 (19:30 +0200)
commitf0f7e5265b3b37b0aea3d7601607e2e46ea6a9c1
tree0d2b23965d35b2abcb4a24f74804ef15f572f177
parentc33fd0b17eab643e13cb8555a0588ae6eee8f657
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 sys-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>
Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.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