summaryrefslogtreecommitdiff
path: root/include/fdtdec.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-04-15 11:08:20 +0300
committerSimon Glass <sjg@chromium.org>2019-04-24 05:26:43 +0300
commitd81d96901eacfc9ffbe7c26a8d9b55d02b3fcb0c (patch)
tree8caa202a32ec5f9bc121180dc8b3f6444c314080 /include/fdtdec.h
parentf2100f6f77212e2a5b3db165e84eed911be5c3f6 (diff)
downloadu-boot-d81d96901eacfc9ffbe7c26a8d9b55d02b3fcb0c.tar.xz
fdtdec: Use fdt_setprop_u32() for fdtdec_set_phandle()
The fdt_setprop_u32() function does everything that we need, so we really only use the function as a convenience wrapper, in which case it can simply be a static inline function. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/fdtdec.h')
-rw-r--r--include/fdtdec.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 266c58271f..110aa6ab6d 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -1029,7 +1029,10 @@ int fdtdec_setup_memory_banksize(void);
* @param phandle phandle to set for the given node
* @return 0 on success or a negative error code on failure
*/
-int fdtdec_set_phandle(void *blob, int node, uint32_t phandle);
+static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
+{
+ return fdt_setprop_u32(blob, node, "phandle", phandle);
+}
/**
* fdtdec_add_reserved_memory() - add or find a reserved-memory node