diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-01-25 08:02:48 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-29 03:52:59 -0500 |
commit | ae8ce289e55e6f9911016f73ac85dcb2e0c0c9c1 (patch) | |
tree | 90909323290037522932a4ea9eb6fa7053878997 /drivers/bcma | |
parent | 3c313161353ad527de1a6ecde0f0d41700858fd6 (diff) |
bcma: add empty PCIe hostmode functions if support is disabled
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>
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/bcma_private.h | 8 | ||||
-rw-r--r-- | drivers/bcma/driver_pci.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h index 3f314c98d089..ac6c5fca906d 100644 --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h | |||
@@ -107,6 +107,14 @@ extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc); | |||
107 | #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE | 107 | #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE |
108 | bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc); | 108 | bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc); |
109 | void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc); | 109 | void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc); |
110 | #else | ||
111 | static inline bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) | ||
112 | { | ||
113 | return false; | ||
114 | } | ||
115 | static inline void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) | ||
116 | { | ||
117 | } | ||
110 | #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */ | 118 | #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */ |
111 | 119 | ||
112 | #ifdef CONFIG_BCMA_DRIVER_GPIO | 120 | #ifdef CONFIG_BCMA_DRIVER_GPIO |
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c index 50329d1057ed..b85a505603e6 100644 --- a/drivers/bcma/driver_pci.c +++ b/drivers/bcma/driver_pci.c | |||
@@ -226,11 +226,9 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) | |||
226 | if (pc->setup_done) | 226 | if (pc->setup_done) |
227 | return; | 227 | return; |
228 | 228 | ||
229 | #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE | ||
230 | pc->hostmode = bcma_core_pci_is_in_hostmode(pc); | 229 | pc->hostmode = bcma_core_pci_is_in_hostmode(pc); |
231 | if (pc->hostmode) | 230 | if (pc->hostmode) |
232 | bcma_core_pci_hostmode_init(pc); | 231 | bcma_core_pci_hostmode_init(pc); |
233 | #endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */ | ||
234 | 232 | ||
235 | if (!pc->hostmode) | 233 | if (!pc->hostmode) |
236 | bcma_core_pci_clientmode_init(pc); | 234 | bcma_core_pci_clientmode_init(pc); |