]> git.baikalelectronics.ru Git - uboot.git/commit
dm: core: fix dev_read_alias_highest_id() without libfdt
authorMichael Walle <michael@walle.cc>
Mon, 1 Jun 2020 23:47:08 +0000 (01:47 +0200)
committerSimon Glass <sjg@chromium.org>
Fri, 12 Jun 2020 02:52:11 +0000 (20:52 -0600)
commit05411df74742d130d735426ea271fd89d1afcb3a
tree0ace158e08376382aaa292ae182f1ec7341fd1bf
parent2bfaf9860e800612a79fd09d650b9e99c31e761c
dm: core: fix dev_read_alias_highest_id() without libfdt

If CONFIG_DM_DEV_READ_INLINE is set, dev_read_alias_highest_id() calls
libfdt_get_highest_id(). But this function is only available if we have
libfdt compiled in. If its not available return -1, which matches the
return code for no alias found.

This fixes the following error on omapl138_lcdk:
arm-linux-gnueabi-ld.bfd: drivers/built-in.o: in function `dev_read_alias_highest_id':
/home/mw/repo/u-boot/include/dm/read.h:986: undefined reference to `fdtdec_get_alias_highest_id'

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/dm/read.h