summaryrefslogtreecommitdiffstats
path: root/drivers/dma/ep93xx_dma.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-01-10 09:52:59 +0100
committerVinod Koul <vinod.koul@intel.com>2013-01-12 14:07:22 +0100
commit0efcdb20f4a83967c99da3d3bef9018f86532fae (patch)
treef60970a3ed460f8fb3b6190fbcb8c1b35b691fe6 /drivers/dma/ep93xx_dma.c
parentdma: dw_dmac: check direction properly in dw_dma_cyclic_prep (diff)
downloadlinux-0efcdb20f4a83967c99da3d3bef9018f86532fae.tar.xz
linux-0efcdb20f4a83967c99da3d3bef9018f86532fae.zip
dma: ep93xx_dma: reuse is_slave_direction helper
The is_slave_direction helps to check if the transfer type is slave. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/dma/ep93xx_dma.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index bcfde400904f..f2bf8c0c4675 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -903,8 +903,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
switch (data->port) {
case EP93XX_DMA_SSP:
case EP93XX_DMA_IDE:
- if (data->direction != DMA_MEM_TO_DEV &&
- data->direction != DMA_DEV_TO_MEM)
+ if (!is_slave_direction(data->direction))
return -EINVAL;
break;
default: