]> git.karo-electronics.de Git - linux-beck.git/commitdiff
bcma: add empty PCIe hostmode functions if support is disabled
authorRafał Miłecki <zajec5@gmail.com>
Sun, 25 Jan 2015 13:02:48 +0000 (14:02 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 29 Jan 2015 08:52:59 +0000 (10:52 +0200)
This allows us to drop some #ifdef magic (mess).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/bcma/bcma_private.h
drivers/bcma/driver_pci.c

index 3f314c98d089bf551d7ec1293465dd2a3bb0ac82..ac6c5fca906d015d585f35fd9b57dc6f68d9d70b 100644 (file)
@@ -107,6 +107,14 @@ extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc);
 #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
 bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc);
 void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc);
+#else
+static inline bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc)
+{
+       return false;
+}
+static inline void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
+{
+}
 #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
 
 #ifdef CONFIG_BCMA_DRIVER_GPIO
index 50329d1057ed5dc5c929fde89237add36c55ea48..b85a505603e64e96fe6e06c7cd16adf5e05677ac 100644 (file)
@@ -226,11 +226,9 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
        if (pc->setup_done)
                return;
 
-#ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE
        pc->hostmode = bcma_core_pci_is_in_hostmode(pc);
        if (pc->hostmode)
                bcma_core_pci_hostmode_init(pc);
-#endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
 
        if (!pc->hostmode)
                bcma_core_pci_clientmode_init(pc);