diff mbox

bcma: add support for population subnodes also when build as module

Message ID 1442666630-19087-1-git-send-email-hauke@hauke-m.de (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Hauke Mehrtens Sept. 19, 2015, 12:43 p.m. UTC
of_default_bus_match_table was not exported earlier, so it could only
be accessed by code compiled into the kernel. A new function
of_platform_default_populate() was added which uses
of_default_bus_match_table and this function is also exported. This way
it is possible to create a bus with the content of
of_default_bus_match_table and we can remove the hacks from bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/bcma/main.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Kalle Valo Sept. 29, 2015, 7:59 a.m. UTC | #1
> of_default_bus_match_table was not exported earlier, so it could only
> be accessed by code compiled into the kernel. A new function
> of_platform_default_populate() was added which uses
> of_default_bus_match_table and this function is also exported. This way
> it is possible to create a bus with the content of
> of_default_bus_match_table and we can remove the hacks from bcma.
> 
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 24882c1..59d8d0d 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -436,13 +436,8 @@  int bcma_bus_register(struct bcma_bus *bus)
 	}
 
 	dev = bcma_bus_get_host_dev(bus);
-	/* TODO: remove check for IS_BUILTIN(CONFIG_BCMA) check when
-	 * of_default_bus_match_table is exported or in some other way
-	 * accessible. This is just a temporary workaround.
-	 */
-	if (IS_BUILTIN(CONFIG_BCMA) && dev) {
-		of_platform_populate(dev->of_node, of_default_bus_match_table,
-				     NULL, dev);
+	if (dev) {
+		of_platform_default_populate(dev->of_node, NULL, dev);
 	}
 
 	/* Cores providing flash access go before SPROM init */