[U-Boot] [PATCH v2 2/4] fdt_support: define stub for fdt_fixup_mtdparts

christopher.spinrath at rwth-aachen.de christopher.spinrath at rwth-aachen.de
Tue Jul 12 23:37:35 CEST 2016


From: Christopher Spinrath <christopher.spinrath at rwth-aachen.de>

Define an inline stub for fdt_fixup_mtdparts in the case that
CONFIG_FDT_FIXUP_PARTITIONS is not defined. This avoids the need
to guard every call to this function by a proper #ifdef in board
files.

Signed-off-by: Christopher Spinrath <christopher.spinrath at rwth-aachen.de>
---

Notes:
    Changes since v1:
     - this is a new patch in v2 that is required to address the review
       comments for patch 3 (remove #ifdef guards)

 include/fdt_support.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/fdt_support.h b/include/fdt_support.h
index d34e959..7318098 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -172,7 +172,13 @@ int fdt_increase_size(void *fdt, int add_len);
 
 int fdt_fixup_nor_flash_size(void *blob);
 
+#if defined(CONFIG_FDT_FIXUP_PARTITIONS)
 void fdt_fixup_mtdparts(void *fdt, void *node_info, int node_info_size);
+#else
+static inline void fdt_fixup_mtdparts(void *fdt, void *node_info,
+					int node_info_size) {}
+#endif
+
 void fdt_del_node_and_alias(void *blob, const char *alias);
 u64 fdt_translate_address(void *blob, int node_offset, const __be32 *in_addr);
 int fdt_node_offset_by_compat_reg(void *blob, const char *compat,
-- 
2.9.0



More information about the U-Boot mailing list