summaryrefslogtreecommitdiff
path: root/arch/xtensa/platforms/xt2000/setup.c
diff options
context:
space:
mode:
authorAndrew Davis <afd@ti.com>2026-03-02 13:35:42 -0600
committerMax Filippov <jcmvbkbc@gmail.com>2026-03-03 12:02:57 -0800
commit7a3595dfffb84f7ff3d8e2800b271d02d2933d04 (patch)
tree2f8fd38fa52cdb0768d90fd0ea6933f89f771add /arch/xtensa/platforms/xt2000/setup.c
parenta413a26a0ee935fa59cbfb3ba289e345baf6ce79 (diff)
downloadlwn-7a3595dfffb84f7ff3d8e2800b271d02d2933d04.tar.gz
lwn-7a3595dfffb84f7ff3d8e2800b271d02d2933d04.zip
xtensa: xt2000: Use register_sys_off_handler(SYS_OFF_MODE_RESTART)
Function register_restart_handler() is deprecated. Using this new API removes our need to keep and manage a struct notifier_block. Signed-off-by: Andrew Davis <afd@ti.com> Message-ID: <20260302193543.275197-2-afd@ti.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/platforms/xt2000/setup.c')
-rw-r--r--arch/xtensa/platforms/xt2000/setup.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/xtensa/platforms/xt2000/setup.c b/arch/xtensa/platforms/xt2000/setup.c
index 258e01a51fd8..eda4c15c6826 100644
--- a/arch/xtensa/platforms/xt2000/setup.c
+++ b/arch/xtensa/platforms/xt2000/setup.c
@@ -50,8 +50,7 @@ static int xt2000_power_off(struct sys_off_data *unused)
return NOTIFY_DONE;
}
-static int xt2000_restart(struct notifier_block *this,
- unsigned long event, void *ptr)
+static int xt2000_restart(struct sys_off_data *unused)
{
/* Flush and reset the mmu, simulate a processor reset, and
* jump to the reset vector. */
@@ -60,10 +59,6 @@ static int xt2000_restart(struct notifier_block *this,
return NOTIFY_DONE;
}
-static struct notifier_block xt2000_restart_block = {
- .notifier_call = xt2000_restart,
-};
-
void __init platform_setup(char** cmdline)
{
led_print (0, "LINUX ");
@@ -140,7 +135,9 @@ static int __init xt2000_setup_devinit(void)
platform_device_register(&xt2000_serial8250_device);
platform_device_register(&xt2000_sonic_device);
mod_timer(&heartbeat_timer, jiffies + HZ / 2);
- register_restart_handler(&xt2000_restart_block);
+ register_sys_off_handler(SYS_OFF_MODE_RESTART,
+ SYS_OFF_PRIO_PLATFORM,
+ xt2000_restart, NULL);
register_sys_off_handler(SYS_OFF_MODE_POWER_OFF,
SYS_OFF_PRIO_DEFAULT,
xt2000_power_off, NULL);