ARM: s3c64xx: prepare initcalls for multiplatform
In a multiplatform kernel, each initcall is run regardless of the platform it is meant for, so it must not attempt to access SoC-specific registers. This adds 'if (soc_is_s3c64xx)' to all initcalls that are specific to the s3c64xx platform, to prevent them from breaking other platforms once we can build them into a combined kernel. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <asm/cpuidle.h>
|
||||
|
||||
#include <plat/cpu.h>
|
||||
#include <mach/map.h>
|
||||
|
||||
#include "regs-sys.h"
|
||||
@@ -57,6 +58,8 @@ static struct cpuidle_driver s3c64xx_cpuidle_driver = {
|
||||
|
||||
static int __init s3c64xx_init_cpuidle(void)
|
||||
{
|
||||
return cpuidle_register(&s3c64xx_cpuidle_driver, NULL);
|
||||
if (soc_is_s3c64xx())
|
||||
return cpuidle_register(&s3c64xx_cpuidle_driver, NULL);
|
||||
return 0;
|
||||
}
|
||||
device_initcall(s3c64xx_init_cpuidle);
|
||||
|
Reference in New Issue
Block a user