diff options
-rw-r--r-- | drivers/core/device.c | 3 | ||||
-rw-r--r-- | drivers/serial/sandbox.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 05dadf98f9..84f0f0fbf0 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -404,7 +404,8 @@ int device_probe(struct udevice *dev) goto fail; } - if (drv->ofdata_to_platdata && dev_has_of_node(dev)) { + if (drv->ofdata_to_platdata && + (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) { ret = drv->ofdata_to_platdata(dev); if (ret) goto fail; diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c index 33102fc872..2f7bc24887 100644 --- a/drivers/serial/sandbox.c +++ b/drivers/serial/sandbox.c @@ -220,6 +220,8 @@ static int sandbox_serial_ofdata_to_platdata(struct udevice *dev) const char *colour; int i; + if (CONFIG_IS_ENABLED(OF_PLATDATA)) + return 0; plat->colour = -1; colour = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "sandbox,text-colour", NULL); |