dma: ep93xx_dma: reuse is_slave_direction helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 10 Jan 2013 08:52:59 +0000 (10:52 +0200)
committerVinod Koul <vinod.koul@intel.com>
Sat, 12 Jan 2013 13:07:22 +0000 (05:07 -0800)
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>
drivers/dma/ep93xx_dma.c

index bcfde400904ff9a6dd05e957eb1159d5fc98f771..f2bf8c0c46757d0dbd351af10660cc5643f2cfbd 100644 (file)
@@ -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: