mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 22:20:45 +00:00
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>
This commit is contained in:
parent
c03b7612ea
commit
0a6b75f7d8
1 changed files with 2 additions and 0 deletions
|
@ -983,6 +983,8 @@ static inline u64 dev_translate_dma_address(const struct udevice *dev,
|
|||
|
||||
static inline int dev_read_alias_highest_id(const char *stem)
|
||||
{
|
||||
if (!CONFIG_IS_ENABLED(OF_LIBFDT))
|
||||
return -1;
|
||||
return fdtdec_get_alias_highest_id(gd->fdt_blob, stem);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue