]> git.sur5r.net Git - u-boot/commitdiff
drivers/mtd/onenand: Move conditional compilation to Makefile
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tue, 12 Aug 2008 23:40:42 +0000 (01:40 +0200)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tue, 12 Aug 2008 23:40:42 +0000 (01:40 +0200)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
drivers/mtd/onenand/Makefile
drivers/mtd/onenand/onenand_base.c
drivers/mtd/onenand/onenand_bbt.c
drivers/mtd/onenand/onenand_uboot.c

index 92074b255287ba860f5befaeaf961e0662c6ef5d..1d35a57d84f01336eabda2e7bc6e15abac59fbb9 100644 (file)
@@ -25,8 +25,9 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libonenand.a
 
-COBJS  := onenand_uboot.o onenand_base.o onenand_bbt.o
+COBJS-$(CONFIG_CMD_ONENAND)    := onenand_uboot.o onenand_base.o onenand_bbt.o
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
index ded1706abbef7985a05f9480e9714945253b56d8..7c9438be316b71b876a5763fe6eeca681559f7ad 100644 (file)
@@ -10,9 +10,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_CMD_ONENAND
-
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
@@ -1304,5 +1301,3 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
 void onenand_release(struct mtd_info *mtd)
 {
 }
-
-#endif /* CONFIG_CMD_ONENAND */
index 87344ab65f194e7c204657ba7790d694f8a82911..0abaa1ab38ca8a093d0bad3caeae1e8b6f4a7a0e 100644 (file)
@@ -15,9 +15,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_CMD_ONENAND
-
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
@@ -261,5 +258,3 @@ int onenand_default_bbt(struct mtd_info *mtd)
 
        return onenand_scan_bbt(mtd, bbm->badblock_pattern);
 }
-
-#endif /* CFG_CMD_ONENAND */
index bd7466ac9d95dc8155790c36ff4f46f3d18e6d74..d614450616f12dd533ffc08adc9c840a10293b0d 100644 (file)
@@ -14,9 +14,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_CMD_ONENAND
-
 #include <linux/mtd/compat.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/onenand.h>
@@ -37,5 +34,3 @@ void onenand_init(void)
        puts("OneNAND: ");
        print_size(onenand_mtd.size, "\n");
 }
-
-#endif /* CONFIG_CMD_ONENAND */