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>
* @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
}
#endif
-int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
-{
- fdt32_t value = cpu_to_fdt32(phandle);
-
- return fdt_setprop(blob, node, "phandle", &value, sizeof(value));
-}
-
static int fdtdec_init_reserved_memory(void *blob)
{
int na, ns, node, err;