Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <lethal@linux-sh.org>

+4 -2
+4 -2
arch/sh/include/asm/dma.h
··· 19 19 #include <asm-generic/dma.h> 20 20 21 21 #ifdef CONFIG_NR_DMA_CHANNELS 22 - # define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS) 22 + # define MAX_DMA_CHANNELS (CONFIG_NR_DMA_CHANNELS) 23 + #elif defined(CONFIG_NR_ONCHIP_DMA_CHANNELS) 24 + # define MAX_DMA_CHANNELS (CONFIG_NR_ONCHIP_DMA_CHANNELS) 23 25 #else 24 - # define MAX_DMA_CHANNELS (CONFIG_NR_ONCHIP_DMA_CHANNELS) 26 + # define MAX_DMA_CHANNELS 0 25 27 #endif 26 28 27 29 /*