From: Simon Glass <sjg@chromium.org>
Date: Wed, 23 Dec 2020 02:30:24 +0000 (-0700)
Subject: dm: core: Only include simple-bus devicetree id when needed
X-Git-Tag: v2025.01-rc5-pxa1908~2072^2~1^2~74
X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=79ea8f749d6cf779706f297fa2ffbc8f384c57de;p=u-boot.git

dm: core: Only include simple-bus devicetree id when needed

This is not needed when of-platdata is in use. Update it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
index c45212a0d3..7dbcbecd94 100644
--- a/drivers/core/simple-bus.c
+++ b/drivers/core/simple-bus.c
@@ -50,15 +50,17 @@ UCLASS_DRIVER(simple_bus) = {
 	.per_device_plat_auto	= sizeof(struct simple_bus_plat),
 };
 
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
 static const struct udevice_id generic_simple_bus_ids[] = {
 	{ .compatible = "simple-bus" },
 	{ .compatible = "simple-mfd" },
 	{ }
 };
+#endif
 
 U_BOOT_DRIVER(simple_bus) = {
 	.name	= "simple_bus",
 	.id	= UCLASS_SIMPLE_BUS,
-	.of_match = generic_simple_bus_ids,
+	.of_match = of_match_ptr(generic_simple_bus_ids),
 	.flags	= DM_FLAG_PRE_RELOC,
 };