summaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2012-10-18 17:34:12 +0300
committerVinod Koul <vinod.koul@intel.com>2013-01-07 22:04:52 -0800
commite63a47a361e03eaf79e0f2f6cdaca8e7679d1867 (patch)
tree0cbd9b8403484048fbf97f5d4efa3a6df1d53274 /drivers/dma/dw_dmac.c
parentba84bd7146b9244de0ce04cdc668521a73f5336f (diff)
downloadblackbird-op-linux-e63a47a361e03eaf79e0f2f6cdaca8e7679d1867.tar.gz
blackbird-op-linux-e63a47a361e03eaf79e0f2f6cdaca8e7679d1867.zip
dw_dmac: introduce to_dw_desc() macro
The to_dw_desc() macro helps to retrieve the dw_desc node from the corresponding list_head structure. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r--drivers/dma/dw_dmac.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 9a27fb70c950..476e9c8fb6ca 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -93,7 +93,7 @@ static struct device *chan2parent(struct dma_chan *chan)
static struct dw_desc *dwc_first_active(struct dw_dma_chan *dwc)
{
- return list_entry(dwc->active_list.next, struct dw_desc, desc_node);
+ return to_dw_desc(dwc->active_list.next);
}
static struct dw_desc *dwc_desc_get(struct dw_dma_chan *dwc)
@@ -600,9 +600,7 @@ static void dw_dma_tasklet(unsigned long data)
if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) {
if (dwc->tx_node_active != dwc->tx_list) {
struct dw_desc *desc =
- list_entry(dwc->tx_node_active,
- struct dw_desc,
- desc_node);
+ to_dw_desc(dwc->tx_node_active);
dma_writel(dw, CLEAR.XFER, dwc->mask);
OpenPOWER on IntegriCloud