sh: Fix up MAX_DMA_CHANNELS definition when DMA is disabled.
authorPaul Mundt <lethal@linux-sh.org>
Thu, 17 Dec 2009 05:25:10 +0000 (14:25 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 17 Dec 2009 05:25:10 +0000 (14:25 +0900)
MAX_DMA_CHANNELS is tested for the total number of channels in order to
populate an IRQ map. Stub this out completely when no DMA support is
enabled -- as used to be the default behaviour before this was
generalized for use by the dmaengine code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/dma.h

index 04ad0e1..07373a0 100644 (file)
 #include <asm-generic/dma.h>
 
 #ifdef CONFIG_NR_DMA_CHANNELS
-#  define MAX_DMA_CHANNELS   (CONFIG_NR_DMA_CHANNELS)
+#  define MAX_DMA_CHANNELS     (CONFIG_NR_DMA_CHANNELS)
+#elif defined(CONFIG_NR_ONCHIP_DMA_CHANNELS)
+#  define MAX_DMA_CHANNELS     (CONFIG_NR_ONCHIP_DMA_CHANNELS)
 #else
-#  define MAX_DMA_CHANNELS   (CONFIG_NR_ONCHIP_DMA_CHANNELS)
+#  define MAX_DMA_CHANNELS     0
 #endif
 
 /*