The whole of common/flash.c is guarded by #if defined() ... #endif.
Move the conditional to common/Makefile.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
# others
obj-$(CONFIG_BOOTSTAGE) += bootstage.o
obj-$(CONFIG_CONSOLE_MUX) += iomux.o
-obj-y += flash.o
+obj-$(CONFIG_MTD_NOR_FLASH) += flash.o
obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o
obj-$(CONFIG_I2C_EDID) += edid.o
obj-$(CONFIG_KALLSYMS) += kallsyms.o
#include <common.h>
#include <flash.h>
-#if defined(CONFIG_MTD_NOR_FLASH)
#include <mtd/cfi_flash.h>
extern flash_info_t flash_info[]; /* info for FLASH chips */
break;
}
}
-
-/*-----------------------------------------------------------------------
- */
-#endif /* !CONFIG_MTD_NOR_FLASH */