From: Keerthy Date: Fri, 21 Dec 2018 21:54:31 +0530 Subject: [U-Boot] [PATCH 2/2] lib: fdtdec: fixup fdtdec_get_addr_size In-Reply-To: <1545409471-10036-1-git-send-email-j-keerthy@ti.com> References: <1545409471-10036-1-git-send-email-j-keerthy@ti.com> Message-ID: <1545409471-10036-3-git-send-email-j-keerthy@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de fix up fdtdec_get_addr_size to use fdtdec_get_addr_size_auto_noparent so that the address cells and size cells are obtained from the parent instead of going by the fixed length. Signed-off-by: Keerthy --- lib/fdtdec.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 18663ce..11a30e1 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -178,11 +178,8 @@ fdt_addr_t fdtdec_get_addr_size_auto_noparent(const void *blob, int node, fdt_addr_t fdtdec_get_addr_size(const void *blob, int node, const char *prop_name, fdt_size_t *sizep) { - int ns = sizep ? (sizeof(fdt_size_t) / sizeof(fdt32_t)) : 0; - - return fdtdec_get_addr_size_fixed(blob, node, prop_name, 0, - sizeof(fdt_addr_t) / sizeof(fdt32_t), - ns, sizep, false); + return fdtdec_get_addr_size_auto_noparent(blob, node, prop_name, 0, + sizep, false); } fdt_addr_t fdtdec_get_addr(const void *blob, int node, const char *prop_name) -- 1.9.1