[PATCH 09/15] of: Create platform_device when creating AMBA device failed

Sascha Hauer s.hauer at pengutronix.de
Tue Jan 27 23:32:13 PST 2015


If creating an AMBA device failed, maybe because AMBA support is
not compiled in, register the device as regular platform device.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/of/platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 92ef534..ab3ccab 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -312,8 +312,8 @@ static int of_platform_bus_create(struct device_node *bus,
 	}
 
 	if (of_device_is_compatible(bus, "arm,primecell")) {
-		of_amba_device_create(bus);
-		return 0;
+		if (of_amba_device_create(bus))
+			return 0;
 	}
 
 	dev = of_platform_device_create(bus, parent);
-- 
2.1.4




More information about the barebox mailing list