summaryrefslogtreecommitdiff
path: root/include/dm/read.h
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel@ziswiler.com>2019-05-20 03:44:57 +0300
committerTom Rini <trini@konsulko.com>2020-06-30 18:12:28 +0300
commit45224e8f26913bbd70960f316401134f3c366d78 (patch)
treec4cc7703dd9ef105d5a7b392c1beee11edea1460 /include/dm/read.h
parentf992af81e9530918d58d5c7c09fabe93d03d0ac2 (diff)
downloadu-boot-45224e8f26913bbd70960f316401134f3c366d78.tar.xz
dm: core: gracefully handle alias seq without of
Gracefully handle alias seq in the platform data rather than OF case. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Diffstat (limited to 'include/dm/read.h')
-rw-r--r--include/dm/read.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dm/read.h b/include/dm/read.h
index 1c1bc3702f..3711386f51 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -923,8 +923,12 @@ static inline const void *dev_read_prop_by_prop(struct ofprop *prop,
static inline int dev_read_alias_seq(const struct udevice *dev, int *devnump)
{
+#if CONFIG_IS_ENABLED(OF_CONTROL)
return fdtdec_get_alias_seq(gd->fdt_blob, dev->uclass->uc_drv->name,
dev_of_offset(dev), devnump);
+#else
+ return -ENOTSUPP;
+#endif
}
static inline int dev_read_u32_array(const struct udevice *dev,