From: Paul Mundt Date: Thu, 17 Dec 2009 05:25:10 +0000 (+0900) Subject: sh: Fix up MAX_DMA_CHANNELS definition when DMA is disabled. X-Git-Tag: upstream/snapshot3+hdmi~15588^2~156 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f7bb2dfed3b15b388c88250b66f590aabc438da;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git sh: Fix up MAX_DMA_CHANNELS definition when DMA is disabled. 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 --- diff --git a/arch/sh/include/asm/dma.h b/arch/sh/include/asm/dma.h index 04ad0e1..07373a0 100644 --- a/arch/sh/include/asm/dma.h +++ b/arch/sh/include/asm/dma.h @@ -19,9 +19,11 @@ #include #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 /*