]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
flash: compile common/flash.c iif CONFIG_MTD_NO_FLASH is enabled
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 11 Feb 2017 13:43:55 +0000 (22:43 +0900)
committerTom Rini <trini@konsulko.com>
Sun, 12 Feb 2017 19:30:31 +0000 (14:30 -0500)
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>
common/Makefile
common/flash.c

index ecc23e6fd322b9fb03e2ab481ec776f1afe1a22c..86225f1564bf2a30ef17c41d6464f5fb825859a6 100644 (file)
@@ -67,7 +67,7 @@ endif
 # 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
index 6d492c729f050a0dcd2a1f91d2513411c5c28247..587ef601585ced8c63e1cc29680cb5021c59c813 100644 (file)
@@ -10,7 +10,6 @@
 #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 */
@@ -218,7 +217,3 @@ void flash_perror (int err)
                break;
        }
 }
-
-/*-----------------------------------------------------------------------
- */
-#endif /* !CONFIG_MTD_NOR_FLASH */