Skip to content

Commit

Permalink
dma: ep93xx_dma: reuse is_slave_direction helper
Browse files Browse the repository at this point in the history
The is_slave_direction helps to check if the transfer type is slave.

Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Viresh Kumar <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
andy-shev authored and Vinod Koul committed Jan 12, 2013
1 parent f44b92f commit 0efcdb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/dma/ep93xx_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0efcdb2

Please sign in to comment.