Re: [PATCH 1/2] dw_dmac: check direction properly indw_dma_cyclic_prep

From: Andy Shevchenko
Date: Thu Nov 15 2012 - 10:17:26 EST


On Thu, 2012-11-15 at 20:28 +0530, viresh kumar wrote:
> On Thu, Nov 15, 2012 at 8:05 PM, viresh kumar <viresh.kumar@xxxxxxxxxx> wrote:
> > On Thu, Nov 15, 2012 at 7:50 PM, Andy Shevchenko
> > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> >> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> >
> >> +static inline bool is_slave_direction(enum dma_transfer_direction direction)
> >> +{
> >> + return (direction == DMA_MEM_TO_DEV) || (direction == DMA_DEV_TO_MEM);
> >> +}
> >
> > I would add this in dmaengine.h and will also include check for DMA_DEV_TO_DEV.
>
> Also, what about is_slave_xfer() name?

No objections.


--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/