diff options
author | Marcel Ziswiler <marcel@ziswiler.com> | 2019-05-20 03:44:57 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-06-30 18:12:28 +0300 |
commit | 45224e8f26913bbd70960f316401134f3c366d78 (patch) | |
tree | c4cc7703dd9ef105d5a7b392c1beee11edea1460 /drivers/core/read.c | |
parent | f992af81e9530918d58d5c7c09fabe93d03d0ac2 (diff) | |
download | u-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 'drivers/core/read.c')
-rw-r--r-- | drivers/core/read.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/core/read.c b/drivers/core/read.c index 047089c886..85b3b7a5ad 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -275,15 +275,17 @@ int dev_read_alias_seq(const struct udevice *dev, int *devnump) { ofnode node = dev_ofnode(dev); const char *uc_name = dev->uclass->uc_drv->name; - int ret; + int ret = -ENOTSUPP; if (ofnode_is_np(node)) { ret = of_alias_get_id(ofnode_to_np(node), uc_name); if (ret >= 0) *devnump = ret; } else { +#if CONFIG_IS_ENABLED(OF_CONTROL) ret = fdtdec_get_alias_seq(gd->fdt_blob, uc_name, ofnode_to_offset(node), devnump); +#endif } return ret; |