fdt_support: define stub for fdt_fixup_mtdparts
authorChristopher Spinrath <christopher.spinrath@rwth-aachen.de>
Tue, 12 Jul 2016 21:37:35 +0000 (23:37 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 19 Jul 2016 17:52:12 +0000 (19:52 +0200)
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@rwth-aachen.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Igor Grinberg <grinberg@compulab.co.il>
include/fdt_support.h

index d34e959ca7886ac672b2ffd347c75c2fab33606d..731809874f480158feb6d4baa96d9d52dbb898cc 100644 (file)
@@ -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,