]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
fdt: Add a do_fixup_by_path_string() function
authorChunhe Lan <Chunhe.Lan@freescale.com>
Wed, 31 Aug 2011 02:36:32 +0000 (10:36 +0800)
committerGerald Van Baren <gvb@unssw.com>
Sat, 15 Oct 2011 13:34:49 +0000 (09:34 -0400)
The do_fixup_by_path_string() will set the specified node's property to the
value contained in "status". It would just be an inline wrapper for
do_fixup_by_path() that calls strlen on the argument.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
include/fdt_support.h

index 8f06aacf7ab50313adfb562ea18d3cf734f9e2c8..0091dc3ebe72595d8382c205cfaaa93ce96b7460 100644 (file)
@@ -36,6 +36,13 @@ void do_fixup_by_path(void *fdt, const char *path, const char *prop,
                      const void *val, int len, int create);
 void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop,
                          u32 val, int create);
+
+static inline void do_fixup_by_path_string(void *fdt, const char *path,
+                                          const char *prop, const char *status)
+{
+       do_fixup_by_path(fdt, path, prop, status, strlen(status) + 1, 1);
+}
+
 void do_fixup_by_prop(void *fdt,
                      const char *pname, const void *pval, int plen,
                      const char *prop, const void *val, int len,