aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorValentine Barshak <vbarshak@ru.mvista.com>2008-04-04 14:24:37 -0400
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-04-05 10:34:13 -0400
commitd0c8df6e4525ebd38a7643ba3dbfe3989dddf781 (patch)
tree4c888de1937affd5c45763adb99dff1acc068486 /arch/powerpc/platforms
parent9d7030be336ca64f9cd46707358e07c0dbd5e133 (diff)
[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 <vbarshak@ru.mvista.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/44x/warp-nand.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/44x/warp-nand.c b/arch/powerpc/platforms/44x/warp-nand.c
index 84ab78ff8c03..9150318cfc56 100644
--- a/arch/powerpc/platforms/44x/warp-nand.c
+++ b/arch/powerpc/platforms/44x/warp-nand.c
@@ -11,6 +11,7 @@
11#include <linux/mtd/partitions.h> 11#include <linux/mtd/partitions.h>
12#include <linux/mtd/nand.h> 12#include <linux/mtd/nand.h>
13#include <linux/mtd/ndfc.h> 13#include <linux/mtd/ndfc.h>
14#include <asm/machdep.h>
14 15
15#ifdef CONFIG_MTD_NAND_NDFC 16#ifdef CONFIG_MTD_NAND_NDFC
16 17
@@ -100,6 +101,6 @@ static int warp_setup_nand_flash(void)
100 101
101 return 0; 102 return 0;
102} 103}
103device_initcall(warp_setup_nand_flash); 104machine_device_initcall(warp, warp_setup_nand_flash);
104 105
105#endif 106#endif