Skip to content

Commit a413a26

Browse files
glneojcmvbkbc
authored andcommitted
xtensa: ISS: 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 <[email protected]> Message-ID: <[email protected]> Signed-off-by: Max Filippov <[email protected]>
1 parent 05f7e89 commit a413a26

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

arch/xtensa/platforms/iss/setup.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ static int iss_power_off(struct sys_off_data *unused)
3232
return NOTIFY_DONE;
3333
}
3434

35-
static int iss_restart(struct notifier_block *this,
36-
unsigned long event, void *ptr)
35+
static int iss_restart(struct sys_off_data *unused)
3736
{
3837
/* Flush and reset the mmu, simulate a processor reset, and
3938
* jump to the reset vector. */
@@ -42,10 +41,6 @@ static int iss_restart(struct notifier_block *this,
4241
return NOTIFY_DONE;
4342
}
4443

45-
static struct notifier_block iss_restart_block = {
46-
.notifier_call = iss_restart,
47-
};
48-
4944
static int
5045
iss_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
5146
{
@@ -84,7 +79,9 @@ void __init platform_setup(char **p_cmdline)
8479
}
8580

8681
atomic_notifier_chain_register(&panic_notifier_list, &iss_panic_block);
87-
register_restart_handler(&iss_restart_block);
82+
register_sys_off_handler(SYS_OFF_MODE_RESTART,
83+
SYS_OFF_PRIO_PLATFORM,
84+
iss_restart, NULL);
8885
register_sys_off_handler(SYS_OFF_MODE_POWER_OFF,
8986
SYS_OFF_PRIO_PLATFORM,
9087
iss_power_off, NULL);

0 commit comments

Comments
 (0)