RSCTRL_KEY_MASK, RSCTRL_KEY);
}
-static int rsctrl_restart_handler(struct notifier_block *this,
- unsigned long mode, void *cmd)
+static int rsctrl_restart_handler(struct sys_off_data *data)
{
/* enable write access to RSTCTRL */
rsctrl_enable_rspll_write();
return NOTIFY_DONE;
}
-static struct notifier_block rsctrl_restart_nb = {
- .notifier_call = rsctrl_restart_handler,
- .priority = 128,
-};
-
static const struct of_device_id rsctrl_of_match[] = {
{.compatible = "ti,keystone-reset", },
{},
return ret;
}
- ret = register_restart_handler(&rsctrl_restart_nb);
+ ret = devm_register_sys_off_handler(dev, SYS_OFF_MODE_RESTART, 128,
+ rsctrl_restart_handler, NULL);
if (ret)
dev_err(dev, "cannot register restart handler (err=%d)\n", ret);