diff mbox series

[3/3] flash: compile common/flash.c iif CONFIG_MTD_NO_FLASH is enabled

Message ID 1486820635-8467-4-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 554c73c0256c9e22af1b89e842a310b73b5eb657
Headers show
Series Move CONFIG_SYS_NO_FLASH and rename it to CONFIG_MTD_NOR_FLASH | expand

Commit Message

Masahiro Yamada Feb. 11, 2017, 1:43 p.m. UTC
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 | 2 +-
 common/flash.c  | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Comments

Tom Rini Feb. 12, 2017, 7:31 p.m. UTC | #1
On Sat, Feb 11, 2017 at 10:43:55PM +0900, Masahiro Yamada wrote:

> 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>


Applied to u-boot/master, thanks!

-- 
Tom
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox series

Patch

diff --git a/common/Makefile b/common/Makefile
index ecc23e6..86225f1 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -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
diff --git a/common/flash.c b/common/flash.c
index 6d492c7..587ef60 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -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 */