On 01/10/2015 12:08 PM, Måns Rullgård wrote:
Lars-Peter Clausen <lars@xxxxxxxxxx> writes:
Use the recently introduced do_kernel_restart() function as the default restart
handler if the platform did not explicitly provide a restart handler. This
allows use restart handler that have been registered by device drivers to
restart the machine.
Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
---
arch/mips/kernel/reset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c
index 07fc524..36cd80c 100644
--- a/arch/mips/kernel/reset.c
+++ b/arch/mips/kernel/reset.c
@@ -19,7 +19,7 @@
* So handle all using function pointers to machine specific
* functions.
*/
-void (*_machine_restart)(char *command);
+void (*_machine_restart)(char *command) = do_kernel_restart;
void (*_machine_halt)(void);
void (*pm_power_off)(void);
There is already a similar patch posted by Kevin Cernekee:
http://www.linux-mips.org/archives/linux-mips/2014-12/msg00410.html
Personally I prefer the earlier patch, though I guess that is personal preference.
Guenter