]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: mach-shmobile: Runtime PM late init callback
authorMagnus Damm <damm@opensource.se>
Sun, 10 Jul 2011 08:38:34 +0000 (10:38 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 10 Jul 2011 08:38:34 +0000 (10:38 +0200)
Add a mach-shmobile specific callback for SoC-specific code
to hook into. By having the late_initcall() in a common place
we can have multi-SoC/board support in the same kernel binary.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
arch/arm/mach-shmobile/include/mach/common.h
arch/arm/mach-shmobile/pm_runtime.c

index 06aecb31d9c7ececc9784ced7086ccc9ed83418f..73a76d75ccbc745cced76d936a8f7e53f72d5f8d 100644 (file)
@@ -12,6 +12,7 @@ extern struct platform_suspend_ops shmobile_suspend_ops;
 struct cpuidle_device;
 extern void (*shmobile_cpuidle_modes[])(void);
 extern void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev);
+extern void (*shmobile_runtime_pm_late_init)(void);
 
 extern void sh7367_init_irq(void);
 extern void sh7367_add_early_devices(void);
index 2bcde1c46a6bfc1c29e36c42e9114f1d26d943d2..2f6ded5712ee59ecb5f310cd643b06d786898716 100644 (file)
@@ -56,3 +56,13 @@ static int __init sh_pm_runtime_init(void)
        return 0;
 }
 core_initcall(sh_pm_runtime_init);
+
+void (*shmobile_runtime_pm_late_init)(void);
+
+static int __init sh_pm_runtime_late_init(void)
+{
+       if (shmobile_runtime_pm_late_init)
+               shmobile_runtime_pm_late_init();
+       return 0;
+}
+late_initcall(sh_pm_runtime_late_init);