reboot: get corrent reboot reason in system panic [1/1]

PD#TV-2272

Problem:
can't get corrent reboot reason in system panic

Solution:
get corrent reboot reason in system panic

Verify:
test pass on T962x2_x301

Change-Id: If0fc95c2807d89542b4ccbc8e3709be20f17b03b
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
This commit is contained in:
Hong Guo
2019-02-22 17:18:35 +08:00
committed by Luke Go
parent fab91eed12
commit 3b674db635

View File

@@ -250,7 +250,21 @@ static int aml_restart_probe(struct platform_device *pdev)
}
#endif
ret = register_die_notifier(&panic_notifier);
return ret;
if (ret != 0) {
pr_err("%s,register die notifier failed,ret =%d!\n",
__func__, ret);
return ret;
}
/* Register a call for panic conditions. */
ret = atomic_notifier_chain_register(&panic_notifier_list,
&panic_notifier);
if (ret != 0) {
pr_err("%s,register panic notifier failed,ret =%d!\n",
__func__, ret);
return ret;
}
return 0;
}
static const struct of_device_id of_aml_restart_match[] = {