diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-08-13 01:40:42 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-08-13 01:40:42 +0200 |
commit | 4fb09b81920e5dfdfc4576883186733f0bd6059c (patch) | |
tree | 2c78a7e50edac0f91614d6b3c8bd16a859126595 | |
parent | 00b1883a4cac59d97cd297b1a3a398db85982865 (diff) | |
download | u-boot-4fb09b81920e5dfdfc4576883186733f0bd6059c.zip u-boot-4fb09b81920e5dfdfc4576883186733f0bd6059c.tar.gz u-boot-4fb09b81920e5dfdfc4576883186733f0bd6059c.tar.bz2 |
drivers/mtd/onenand: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
-rw-r--r-- | drivers/mtd/onenand/Makefile | 3 | ||||
-rw-r--r-- | drivers/mtd/onenand/onenand_base.c | 5 | ||||
-rw-r--r-- | drivers/mtd/onenand/onenand_bbt.c | 5 | ||||
-rw-r--r-- | drivers/mtd/onenand/onenand_uboot.c | 5 |
4 files changed, 2 insertions, 16 deletions
diff --git a/drivers/mtd/onenand/Makefile b/drivers/mtd/onenand/Makefile index 92074b2..1d35a57 100644 --- a/drivers/mtd/onenand/Makefile +++ b/drivers/mtd/onenand/Makefile @@ -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)) diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index ded1706..7c9438b 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -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 */ diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c index 87344ab..0abaa1a 100644 --- a/drivers/mtd/onenand/onenand_bbt.c +++ b/drivers/mtd/onenand/onenand_bbt.c @@ -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 */ diff --git a/drivers/mtd/onenand/onenand_uboot.c b/drivers/mtd/onenand/onenand_uboot.c index bd7466a..d614450 100644 --- a/drivers/mtd/onenand/onenand_uboot.c +++ b/drivers/mtd/onenand/onenand_uboot.c @@ -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 */ |