提交 d0c8df6e 编写于 作者: V Valentine Barshak 提交者: Josh Boyer

[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: NValentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
上级 9d7030be
......@@ -11,6 +11,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/ndfc.h>
#include <asm/machdep.h>
#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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册