Merge ../u-boot
[oweals/u-boot.git] / drivers / nand / nand_bbt.c
index f4813088b5e3ed45a61ee3571458704f30f0cb6c..19a9bc2a5b6cdc6469118545fa2fdc0cfd80f5d0 100644 (file)
@@ -54,8 +54,7 @@
 
 #include <common.h>
 
-#ifdef CONFIG_NEW_NAND_CODE
-#if (CONFIG_COMMANDS & CFG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
 
 #include <malloc.h>
 #include <linux/mtd/compat.h>
@@ -1051,5 +1050,3 @@ int nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt)
 }
 
 #endif
-#endif /* CONFIG_NEW_NAND_CODE */
-