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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux