Commit 8ddb10eae0c0e6936c69b19c21aaa2f6e0433717
Committed by
Gerald Van Baren
1 parent
d8fffa057c
Exists in
master
and in
55 other branches
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. Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff
include/fdt_support.h
... | ... | @@ -36,6 +36,13 @@ |
36 | 36 | const void *val, int len, int create); |
37 | 37 | void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop, |
38 | 38 | u32 val, int create); |
39 | + | |
40 | +static inline void do_fixup_by_path_string(void *fdt, const char *path, | |
41 | + const char *prop, const char *status) | |
42 | +{ | |
43 | + do_fixup_by_path(fdt, path, prop, status, strlen(status) + 1, 1); | |
44 | +} | |
45 | + | |
39 | 46 | void do_fixup_by_prop(void *fdt, |
40 | 47 | const char *pname, const void *pval, int plen, |
41 | 48 | const char *prop, const void *val, int len, |