Merge branch 'Makefile' of git://git.denx.de/u-boot-arm
[oweals/u-boot.git] / drivers / mtd / nand / nand_base.c
index cf2f3745542b7ceae4626fe2b41e7524c3d0f77e..0913bb87418cb52bf43d8efbd4944c358811ec0c 100644 (file)
@@ -59,8 +59,6 @@
 
 #define ENOTSUPP       524     /* Operation is not supported */
 
-#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY)
-
 #include <malloc.h>
 #include <watchdog.h>
 #include <linux/err.h>
@@ -773,6 +771,7 @@ nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state)
 #else
 static int nand_get_device (struct nand_chip *this, struct mtd_info *mtd, int new_state)
 {
+       this->state = new_state;
        return 0;
 }
 #endif
@@ -2821,6 +2820,3 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Steven J. Hill <sjhill@realitydiluted.com>, Thomas Gleixner <tglx@linutronix.de>");
 MODULE_DESCRIPTION("Generic NAND flash driver code");
 #endif
-
-#endif
-