Merge with git://www.denx.de/git/u-boot.git#testing-USB
[oweals/u-boot.git] / drivers / nand / nand_ecc.c
index e0d0e8bcc40705b6a42d47c3526fc5441a16fd1c..f33be9655d36150cefadc990f88a8b4b6cf8f077 100644 (file)
 
 #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<linux/mtd/mtd.h>
 /*