From: Richard Zhao Date: Thu, 2 Feb 2012 02:12:00 +0000 (+0800) Subject: ARM: mxc: make imx_dma_is_general_purpose more generic for sdma X-Git-Tag: firefly_0821_release~3680^2~3234^2~13^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=89857353f9264785517393753ec9e77dba144734;p=firefly-linux-kernel-4.4.55.git ARM: mxc: make imx_dma_is_general_purpose more generic for sdma sdma device names vary for different SoC. So we just check whether it includes "sdma" substring. Signed-off-by: Richard Zhao Acked-by: Sascha Hauer Signed-off-by: Shawn Guo --- diff --git a/arch/arm/plat-mxc/include/mach/dma.h b/arch/arm/plat-mxc/include/mach/dma.h index 233d0a5e2d68..1b9080385b46 100644 --- a/arch/arm/plat-mxc/include/mach/dma.h +++ b/arch/arm/plat-mxc/include/mach/dma.h @@ -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"); }