Fix JFFS2 support for legacy NAND driver.
Some more NAND cleanup and small fixes.
diff --git a/drivers/nand/nand_bbt.c b/drivers/nand/nand_bbt.c
index ac16872..aaa9400 100644
--- a/drivers/nand/nand_bbt.c
+++ b/drivers/nand/nand_bbt.c
@@ -54,11 +54,7 @@
#include <common.h>
-#ifdef CFG_NAND_LEGACY
-#error CFG_NAND_LEGACY defined in a file not using the legacy NAND support!
-#endif
-
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#if (CONFIG_COMMANDS & CFG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
#include <malloc.h>
#include <linux/mtd/compat.h>