ARM: mxc: make imx_dma_is_general_purpose more generic for sdma
authorRichard Zhao <richard.zhao@linaro.org>
Thu, 2 Feb 2012 02:12:00 +0000 (10:12 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Mon, 27 Feb 2012 07:17:58 +0000 (15:17 +0800)
sdma device names vary for different SoC. So we just check
whether it includes "sdma" substring.

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/plat-mxc/include/mach/dma.h

index 233d0a5..1b90803 100644 (file)
@@ -60,8 +60,7 @@ static inline int imx_dma_is_ipu(struct dma_chan *chan)
 
 static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
 {
-       return !strcmp(dev_name(chan->device->dev), "imx31-sdma") ||
-               !strcmp(dev_name(chan->device->dev), "imx35-sdma") ||
+       return strstr(dev_name(chan->device->dev), "sdma") ||
                !strcmp(dev_name(chan->device->dev), "imx-dma");
 }