1 From 6156ba379ce50e8a969e4e87c9e1eddb117a9e4c Mon Sep 17 00:00:00 2001
2 From: Andrei Gherzan <andrei@gherzan.com>
3 Date: Mon, 5 Jun 2017 16:40:38 +0100
4 Subject: [PATCH 119/454] dma-bcm2708: Fix module compilation of
7 bcm2708-dmaengine.c defines functions like bcm_dma_start which are
8 defined as well in dma-bcm2708.h as inline versions when
9 CONFIG_DMA_BCM2708 is not defined. This works fine when
10 CONFIG_DMA_BCM2708 is built in, but when it is selected as module build
11 fails with redefinition errors because in the build system when
12 CONFIG_DMA_BCM2708 is selected as module, the macro becomes
13 CONFIG_DMA_BCM2708_MODULE.
15 This patch makes the header use CONFIG_DMA_BCM2708_MODULE too when
18 Fixes https://github.com/raspberrypi/linux/issues/2056
20 Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
22 include/linux/platform_data/dma-bcm2708.h | 4 ++--
23 1 file changed, 2 insertions(+), 2 deletions(-)
25 --- a/include/linux/platform_data/dma-bcm2708.h
26 +++ b/include/linux/platform_data/dma-bcm2708.h
27 @@ -75,7 +75,7 @@ struct bcm2708_dma_cb {
29 struct platform_device;
31 -#ifdef CONFIG_DMA_BCM2708
32 +#if defined(CONFIG_DMA_BCM2708) || defined(CONFIG_DMA_BCM2708_MODULE)
34 int bcm_sg_suitable_for_dma(struct scatterlist *sg_ptr, int sg_len);
35 void bcm_dma_start(void __iomem *dma_chan_base, dma_addr_t control_block);
36 @@ -138,6 +138,6 @@ static inline int bcm_dmaman_remove(stru
40 -#endif /* CONFIG_DMA_BCM2708 */
41 +#endif /* CONFIG_DMA_BCM2708 || CONFIG_DMA_BCM2708_MODULE */
43 #endif /* _PLAT_BCM2708_DMA_H */