fdt: Add a do_fixup_by_path_string() function
PATCH v6 1/2 fdt: Add a do_fixup_by_path_string() function
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.
---
Changes for v2:
- renamed from fdt_set_node_status() to do_fixup_by_path_string()
- removed fdt_get_alias()
- removed copyright line
Changes for v3:
- moved function into a header file as an inline function
Changes for v4:
- none
Changes for v5:
- none
Changes for v6:
- added change log
include/fdt_support.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
include/fdt_support.h +7 -0
@@ -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,
Signature · 1 line
1.5.6.5
PATCH v6 1/2 fdt: Add a do_fixup_by_path_string() function
Quoted 5 lines · Chunhe Lan
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 fordo_fixup_by_path()that calls strlen on the argument.Signed-off-by Chunhe Lan<[email protected]>
Added to u-boot-fdt, sent a pull request to wd.
Thanks,
gvb
[snip]