diff mbox series

[v2,2/2] dm: core: Partial revert of "Allocate parent data separate from probing parent"

Message ID 20200401135759.13197-2-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v2,1/2] serial: ns16550: Revert "Move PCI access from ofdata_to_platdata() to probe()" | expand

Commit Message

Andy Shevchenko April 1, 2020, 1:57 p.m. UTC
This reverts commit 82de42fa1468
("dm: core: Allocate parent data separate from probing parent")
as a being a culprit for Apollo Lake breakage.

Suggested-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
---
 drivers/core/device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/core/device.c b/drivers/core/device.c
index 89ea820d48..400767d9bd 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -392,10 +392,6 @@  int device_probe(struct udevice *dev)
 	drv = dev->driver;
 	assert(drv);
 
-	ret = device_ofdata_to_platdata(dev);
-	if (ret)
-		goto fail;
-
 	/* Ensure all parents are probed */
 	if (dev->parent) {
 		ret = device_probe(dev->parent);
@@ -412,6 +408,10 @@  int device_probe(struct udevice *dev)
 			return 0;
 	}
 
+	ret = device_ofdata_to_platdata(dev);
+	if (ret)
+		goto fail;
+
 	seq = uclass_resolve_seq(dev);
 	if (seq < 0) {
 		ret = seq;