diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-27 22:48:48 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-01-28 08:18:44 +0100 |
commit | c42178d9fcbd54ea1696929b5cd351b5683f6d9d (patch) | |
tree | f7282cb17e48d3543ad0e3b3d68a38dae55addec /drivers/of | |
parent | f765925bb9fc5b0989bb9abf95d39aa03a847b37 (diff) | |
download | barebox-c42178d9fcbd54ea1696929b5cd351b5683f6d9d.tar.gz barebox-c42178d9fcbd54ea1696929b5cd351b5683f6d9d.tar.xz |
of: Create platform_device when creating AMBA device failed
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@pengutronix.de>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 92ef53443f..ab3ccab3b6 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); |