diff options
author | John Clarke <johnc@kirriwa.net> | 2018-11-02 12:46:22 +1100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-03-02 07:52:18 +0100 |
commit | 8bd3915555bc21c7d53d17cdbd5cf64ff6a48cb9 (patch) | |
tree | 892da2a4fb00f60187ee44c64d6a15a070343f0e /cpukit/include/libfdt.h | |
parent | score: Fix context switch extensions (SMP) (diff) | |
download | rtems-8bd3915555bc21c7d53d17cdbd5cf64ff6a48cb9.tar.bz2 |
libfdt: return correct value if #size-cells property is not present
According to the device tree specification, the default value for
#size-cells is 1, but fdt_size_cells() was returning 2 if this property
was not present.
This patch also makes fdt_address_cells() and fdt_size_cells() conform
to the behaviour documented in libfdt.h. The defaults are only returned
if fdt_getprop() returns -FDT_ERR_NOTFOUND, otherwise the actual error
is returned.
Signed-off-by: John Clarke <johnc@kirriwa.net>
Diffstat (limited to 'cpukit/include/libfdt.h')
-rw-r--r-- | cpukit/include/libfdt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/include/libfdt.h b/cpukit/include/libfdt.h index 830b77e4be..face02c102 100644 --- a/cpukit/include/libfdt.h +++ b/cpukit/include/libfdt.h @@ -1145,7 +1145,7 @@ int fdt_address_cells(const void *fdt, int nodeoffset); * * returns: * 0 <= n < FDT_MAX_NCELLS, on success - * 2, if the node has no #size-cells property + * 1, if the node has no #size-cells property * -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid * #size-cells property * -FDT_ERR_BADMAGIC, |