Merge branch 'CVE-2014-7975' of git://git.kernel.org/pub/scm/linux/kernel/git/luto...
[sfrench/cifs-2.6.git] / arch / arm / kernel / process.c
index a0a691d1cbeee0e675e3d18674b15fc1f1224342..fe972a2f3df398f9eddbf02b25d4edff987b442d 100644 (file)
@@ -114,18 +114,13 @@ void soft_restart(unsigned long addr)
        BUG();
 }
 
-static void null_restart(enum reboot_mode reboot_mode, const char *cmd)
-{
-}
-
 /*
  * Function pointers to optional machine specific functions
  */
 void (*pm_power_off)(void);
 EXPORT_SYMBOL(pm_power_off);
 
-void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd) = null_restart;
-EXPORT_SYMBOL_GPL(arm_pm_restart);
+void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
 
 /*
  * This is our default idle handler.
@@ -230,7 +225,10 @@ void machine_restart(char *cmd)
        local_irq_disable();
        smp_send_stop();
 
-       arm_pm_restart(reboot_mode, cmd);
+       if (arm_pm_restart)
+               arm_pm_restart(reboot_mode, cmd);
+       else
+               do_kernel_restart(cmd);
 
        /* Give a grace period for failure to restart of 1s */
        mdelay(1000);