diff options
author | Simon Glass <sjg@chromium.org> | 2013-01-21 12:59:18 -0800 |
---|---|---|
committer | Gerald Van Baren <vanbaren@cideas.com> | 2013-05-10 19:04:49 -0400 |
commit | e853b32424e1fbbbcf1a78e6ddd3e732abe72dc0 (patch) | |
tree | 1cab28ab7a4f3a185cd2bf331cb94d3122d2465f /lib | |
parent | 2988eac70ead3720f9ec85a239cd06b2f7246683 (diff) | |
download | u-boot-e853b32424e1fbbbcf1a78e6ddd3e732abe72dc0.tar.gz u-boot-e853b32424e1fbbbcf1a78e6ddd3e732abe72dc0.tar.bz2 u-boot-e853b32424e1fbbbcf1a78e6ddd3e732abe72dc0.zip |
Export fdt_stringlist_contains()
This function is useful outside libfdt, so export it.
Ref: DTC commit b7aa300e
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libfdt/fdt_ro.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c index 1a461c3e97..b65f4e23ad 100644 --- a/lib/libfdt/fdt_ro.c +++ b/lib/libfdt/fdt_ro.c @@ -519,8 +519,7 @@ int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle) return offset; /* error from fdt_next_node() */ } -static int _fdt_stringlist_contains(const char *strlist, int listlen, - const char *str) +int fdt_stringlist_contains(const char *strlist, int listlen, const char *str) { int len = strlen(str); const char *p; @@ -546,7 +545,7 @@ int fdt_node_check_compatible(const void *fdt, int nodeoffset, prop = fdt_getprop(fdt, nodeoffset, "compatible", &len); if (!prop) return len; - if (_fdt_stringlist_contains(prop, len, compatible)) + if (fdt_stringlist_contains(prop, len, compatible)) return 0; else return 1; |