Skip to contentSkip to conversation

bcma: fix build error when build as module

PATCH New Hauke Mehrtens 2 participants 2 messages Jul 25, 2015 – Jul 26, 2015 Broadcom specific amba driver (bcma)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcma: fix build error when build as module

Currently of_default_bus_match_table is not exported so we can only use this feature when bcma is build into the kernel. This patch removes support for child buses when bcma is build as a module as a temporary fix for a build problem introduces in this commit:

commit cae761b5a6bdc597ba476a040fdcd5b4bc559b85

Author: Rafa? Mi?ecki <[email protected]>
Date:   Sun Jun 28 17:17:13 2015 +0200

bcma: populate bus DT subnodes as platform_device-s

---
 drivers/bcma/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/bcma/main.c +5 -1
index 5912847..8d973c4 100644
@@ -410,7 +410,11 @@ int bcma_bus_register(struct bcma_bus *bus)
 		bcma_core_pci_early_init(&bus->drv_pci[0]);
 	}
 
-	if (bus->host_pdev) {
+	/* 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) && bus->host_pdev) {
 		struct device *dev = &bus->host_pdev->dev;
 
 		of_platform_populate(dev->of_node, of_default_bus_match_table,
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 bcma: fix build error when build as module

Quoted 5 lines · Hauke Mehrtens

Currently of_default_bus_match_table is not exported so we can only use this feature when bcma is build into the kernel. This patch removes support for child buses when bcma is build as a module as a temporary fix for a build problem introduces in this commit:

Quoted 7 lines

commit cae761b5a6bdc597ba476a040fdcd5b4bc559b85

Author: Rafa? Mi?ecki <[email protected]>
Date:   Sun Jun 28 17:17:13 2015 +0200

bcma: populate bus DT subnodes as platform_device-s

Thanks, manually applied to wireless-drivers-next.git. (Still patchwork.kernel.org has buggy utf-8 support, sigh.) I just added Reported-by and Fixes lines to the commit log.

I wrote a similar patch but I'll drop that as your has better comments :)

Signature · 1 line
Kalle Valo