diff mbox

[next] bcma: make bcma_host_pci_(up|down) calls safe for every config

Message ID 1425467681-15988-1-git-send-email-zajec5@gmail.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

Rafał Miłecki March 4, 2015, 11:14 a.m. UTC
We were providing declarations but actual code was compiled only with
CONFIG_BCMA_HOST_PCI set. This could result in:
ERROR: "bcma_host_pci_down" [drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko] undefined!
ERROR: "bcma_host_pci_up" [drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko] undefined!
ERROR: "bcma_host_pci_down" [drivers/net/wireless/b43/b43.ko] undefined!
ERROR: "bcma_host_pci_up" [drivers/net/wireless/b43/b43.ko] undefined!

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
---
 include/linux/bcma/bcma.h | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Kalle Valo March 5, 2015, 12:12 p.m. UTC | #1
Rafa? Mi?ecki <zajec5@gmail.com> writes:

> We were providing declarations but actual code was compiled only with
> CONFIG_BCMA_HOST_PCI set. This could result in:
> ERROR: "bcma_host_pci_down" [drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko] undefined!
> ERROR: "bcma_host_pci_up" [drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko] undefined!
> ERROR: "bcma_host_pci_down" [drivers/net/wireless/b43/b43.ko] undefined!
> ERROR: "bcma_host_pci_up" [drivers/net/wireless/b43/b43.ko] undefined!
>
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>

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

Patch

diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 037620b..44057b4 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -434,8 +434,17 @@  static inline struct bcma_device *bcma_find_core(struct bcma_bus *bus,
 	return bcma_find_core_unit(bus, coreid, 0);
 }
 
+#ifdef CONFIG_BCMA_HOST_PCI
 extern void bcma_host_pci_up(struct bcma_bus *bus);
 extern void bcma_host_pci_down(struct bcma_bus *bus);
+#else
+static inline void bcma_host_pci_up(struct bcma_bus *bus)
+{
+}
+static inline void bcma_host_pci_down(struct bcma_bus *bus)
+{
+}
+#endif
 
 extern bool bcma_core_is_enabled(struct bcma_device *core);
 extern void bcma_core_disable(struct bcma_device *core, u32 flags);