[U-Boot] [PATCH v3 2/4] dm: core: Test dev->flags after device_probe() in device_probe_child()
Bin Meng
bmeng.cn at gmail.com
Sun Aug 23 10:32:59 CEST 2015
The device might have already been probed during the call to
device_probe() on its parent device (e.g. PCI bridge devices).
Test the flags again so that we don't mess up the device.
Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
---
Changes in v3: None
drivers/core/device.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/core/device.c b/drivers/core/device.c
index e23a872..7a62812 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -266,6 +266,14 @@ int device_probe_child(struct udevice *dev, void *parent_priv)
goto fail;
}
+ /*
+ * The device might have already been probed during the call to
+ * device_probe() on its parent device (e.g. PCI bridge devices).
+ * Test the flags again so that we don't mess up the device.
+ */
+ if (dev->flags & DM_FLAG_ACTIVATED)
+ return 0;
+
seq = uclass_resolve_seq(dev);
if (seq < 0) {
ret = seq;
--
1.8.2.1
More information about the U-Boot
mailing list