* [PATCH] dw_dmac: update tx_node_active in dwc_do_single_block
@ 2012-12-14 9:43 Andy Shevchenko
2012-12-14 15:28 ` Viresh Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2012-12-14 9:43 UTC (permalink / raw)
To: Vinod Koul, spear-devel, linux-kernel, Viresh Kumar; +Cc: Andy Shevchenko
The "else" keyword in the dw_dma_tasklet is removed as well. All together
simplifies the logic of the code and understanding of what is happening there.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/dma/dw_dmac.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 3c8acfa..8037b66 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -264,6 +264,9 @@ static inline void dwc_do_single_block(struct dw_dma_chan *dwc,
channel_writel(dwc, CTL_LO, ctllo);
channel_writel(dwc, CTL_HI, desc->lli.ctlhi);
channel_set_bit(dw, CH_EN, dwc->mask);
+
+ /* Move pointer to next descriptor */
+ dwc->tx_node_active = dwc->tx_node_active->next;
}
/* Called with dwc->lock held and bh disabled */
@@ -295,7 +298,7 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
dwc_initialize(dwc);
dwc->tx_list = &first->tx_list;
- dwc->tx_node_active = first->tx_list.next;
+ dwc->tx_node_active = &first->tx_list;
dwc_do_single_block(dwc, first);
@@ -621,18 +624,13 @@ static void dw_dma_tasklet(unsigned long data)
dma_writel(dw, CLEAR.XFER, dwc->mask);
- /* move pointer to next descriptor */
- dwc->tx_node_active =
- dwc->tx_node_active->next;
-
dwc_do_single_block(dwc, desc);
spin_unlock_irqrestore(&dwc->lock, flags);
continue;
- } else {
- /* we are done here */
- clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags);
}
+ /* we are done here */
+ clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags);
}
spin_unlock_irqrestore(&dwc->lock, flags);
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dw_dmac: update tx_node_active in dwc_do_single_block
2012-12-14 9:43 [PATCH] dw_dmac: update tx_node_active in dwc_do_single_block Andy Shevchenko
@ 2012-12-14 15:28 ` Viresh Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2012-12-14 15:28 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Vinod Koul, spear-devel, linux-kernel
On 14 December 2012 15:13, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> The "else" keyword in the dw_dma_tasklet is removed as well. All together
> simplifies the logic of the code and understanding of what is happening there.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/dma/dw_dmac.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
Sorry for doing this late, was finding some time to go through code :)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-14 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-14 9:43 [PATCH] dw_dmac: update tx_node_active in dwc_do_single_block Andy Shevchenko
2012-12-14 15:28 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome