libfdt: Use fdt_find_max_phandle()

Use the fdt_find_max_phandle() function instead of the deprecated
fdt_get_max_phandle() function.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Message-Id: <20190326153302.17109-2-thierry.reding@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
Thierry Reding 2019-03-26 16:33:01 +01:00 committed by David Gibson
parent 2bc5b66d7f
commit 7dfb61ba96
1 changed files with 5 additions and 1 deletions

View File

@ -863,12 +863,16 @@ static int overlay_symbol_update(void *fdt, void *fdto)

int fdt_overlay_apply(void *fdt, void *fdto)
{
uint32_t delta = fdt_get_max_phandle(fdt);
uint32_t delta;
int ret;

FDT_RO_PROBE(fdt);
FDT_RO_PROBE(fdto);

ret = fdt_find_max_phandle(fdt, &delta);
if (ret)
goto err;

ret = overlay_adjust_local_phandles(fdto, delta);
if (ret)
goto err;