From: Valentine Barshak Date: Fri, 4 Apr 2008 18:24:37 +0000 (+1100) Subject: [POWERPC] 4xx: Use machine_device_initcall() for warp_nand X-Git-Tag: v2.6.26-rc1~1125^2~77 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0c8df6e4525ebd38a7643ba3dbfe3989dddf781;p=linux-2.6 [POWERPC] 4xx: Use machine_device_initcall() for warp_nand With a multiplatform kernel, once built we always have warp_setup_nand_flash() called and NDFC probed, no matter what machine we actually run on. This potentially can cause problems (such as kernel crash), since NDFC is probed at a warp-predefined address. Using machine_device_initcall() NAND devices are registered if we run on a warp only. Signed-off-by: Valentine Barshak Signed-off-by: Josh Boyer --- diff --git a/arch/powerpc/platforms/44x/warp-nand.c b/arch/powerpc/platforms/44x/warp-nand.c index 84ab78ff8c..9150318cfc 100644 --- a/arch/powerpc/platforms/44x/warp-nand.c +++ b/arch/powerpc/platforms/44x/warp-nand.c @@ -11,6 +11,7 @@ #include #include #include +#include #ifdef CONFIG_MTD_NAND_NDFC @@ -100,6 +101,6 @@ static int warp_setup_nand_flash(void) return 0; } -device_initcall(warp_setup_nand_flash); +machine_device_initcall(warp, warp_setup_nand_flash); #endif