diff options
author | Simon Glass <sjg@chromium.org> | 2016-10-02 17:59:28 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-10-13 13:54:10 -0600 |
commit | b02e4044ff8ee1f6ac83917a39514172a9b449fb (patch) | |
tree | d8f1e23e27364854c39a6592958382d5bdc1ef62 /common/image-fit.c | |
parent | 9c07b9877cf07a1a971a79ed7c2369a58c0baca2 (diff) | |
download | u-boot-b02e4044ff8ee1f6ac83917a39514172a9b449fb.tar.gz u-boot-b02e4044ff8ee1f6ac83917a39514172a9b449fb.tar.bz2 u-boot-b02e4044ff8ee1f6ac83917a39514172a9b449fb.zip |
libfdt: Bring in upstream stringlist functions
These have now landed upstream. The naming is different and in one case the
function signature has changed. Update the code to match.
This applies the following upstream commits by
Thierry Reding <treding@nvidia.com> :
604e61e fdt: Add functions to retrieve strings
8702bd1 fdt: Add a function to get the index of a string
2218387 fdt: Add a function to count strings
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/image-fit.c')
-rw-r--r-- | common/image-fit.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/common/image-fit.c b/common/image-fit.c index 1b0234a90c..d67678a6dd 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1457,7 +1457,7 @@ int fit_conf_get_prop_node(const void *fit, int noffset, void fit_conf_print(const void *fit, int noffset, const char *p) { char *desc; - char *uname; + const char *uname; int ret; int loadables_index; @@ -1469,7 +1469,7 @@ void fit_conf_print(const void *fit, int noffset, const char *p) else printf("%s\n", desc); - uname = (char *)fdt_getprop(fit, noffset, FIT_KERNEL_PROP, NULL); + uname = fdt_getprop(fit, noffset, FIT_KERNEL_PROP, NULL); printf("%s Kernel: ", p); if (uname == NULL) printf("unavailable\n"); @@ -1477,26 +1477,23 @@ void fit_conf_print(const void *fit, int noffset, const char *p) printf("%s\n", uname); /* Optional properties */ - uname = (char *)fdt_getprop(fit, noffset, FIT_RAMDISK_PROP, NULL); + uname = fdt_getprop(fit, noffset, FIT_RAMDISK_PROP, NULL); if (uname) printf("%s Init Ramdisk: %s\n", p, uname); - uname = (char *)fdt_getprop(fit, noffset, FIT_FDT_PROP, NULL); + uname = fdt_getprop(fit, noffset, FIT_FDT_PROP, NULL); if (uname) printf("%s FDT: %s\n", p, uname); - uname = (char *)fdt_getprop(fit, noffset, FIT_FPGA_PROP, NULL); + uname = fdt_getprop(fit, noffset, FIT_FPGA_PROP, NULL); if (uname) printf("%s FPGA: %s\n", p, uname); /* Print out all of the specified loadables */ for (loadables_index = 0; - fdt_get_string_index(fit, noffset, - FIT_LOADABLE_PROP, - loadables_index, - (const char **)&uname) == 0; - loadables_index++) - { + uname = fdt_stringlist_get(fit, noffset, FIT_LOADABLE_PROP, + loadables_index, NULL), uname; + loadables_index++) { if (loadables_index == 0) { printf("%s Loadables: ", p); } else { |