Thread (7 messages) 7 messages, 4 authors, 2013-06-27
DORMANTno replies REVIEWED: 1 (0M)

[PATCH v2] dmaengine: shdma: fix a build failure on platforms with no DMA support

From: horms@verge.net.au (Simon Horman)
Date: 2013-06-27 13:49:20
Also in: linux-mmc, linux-sh

On Fri, May 31, 2013 at 04:51:52PM +0200, Arnd Bergmann wrote:
On Friday 31 May 2013 05:01:31 Guennadi Liakhovetski wrote:
quoted
On platforms with no support for the shdma dmaengine driver build is
currently failing with

drivers/built-in.o: In function `sh_mobile_sdhi_probe':
drivers/mmc/host/sh_mobile_sdhi.c:170: undefined reference to`shdma_chan_filter'

Fix the breakage by defining shdma_chan_filter to NULL in such
configurations.

Signed-off-by: Guennadi Liakhovetski <redacted>
Sorry, I saw your patch too late and already spent some time doing a different one.
quoted
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h
index b64d6be..1fd8a20 100644
--- a/include/linux/sh_dma.h
+++ b/include/linux/sh_dma.h
@@ -99,6 +99,10 @@ struct sh_dmae_pdata {
 #define CHCR_TE        0x00000002
 #define CHCR_IE        0x00000004
 
+#if IS_ENABLED(CONFIG_SH_DMAE_BASE)
 bool shdma_chan_filter(struct dma_chan *chan, void *arg);
+#else
+#define shdma_chan_filter NULL
+#endif
I still think that this is not the right solution, or at least not
complete: No slave driver should care about which dma-engine it is
connected to. You have already done most of the necessary conversion,
so it would be straightforward to also pass the filter function
pointer to the sdhi driver along with the data that gets passed into
it.
Hi Arnd, Hi Guennadi,

It seems to me that the solution above, though not particularly generic,
is sufficient as according to Guennadi SHDMA users cannot use other DMA
drivers[1]. The change above also has the merit of being rather small.

[1] https://patchwork.kernel.org/patch/2644101/

With that reasoning I would like to provide:

Acked-by: Simon Horman <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help