public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: pl330: initialize tasklet after spin_unlock_irqrestore
@ 2016-02-18 17:21 Anand Moon
  2016-02-19  6:06 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 8+ messages in thread
From: Anand Moon @ 2016-02-18 17:21 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams, Anand Moon; +Cc: dmaengine, linux-kernel

From: Anand Moon <linux.amoon@gmail.com>

pl330_tasklet tasklet uses the same spinlock pch->lock for safe IRQ locking.
It's safe to initialize pl330_tasklet tasklet after release of the locking.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/dma/pl330.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 17ee758..df2cab1 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2091,10 +2091,10 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan)
 		return -ENOMEM;
 	}
 
-	tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch);
-
 	spin_unlock_irqrestore(&pch->lock, flags);
 
+	tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch);
+
 	return 1;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-02-21 17:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 17:21 [PATCH] dmaengine: pl330: initialize tasklet after spin_unlock_irqrestore Anand Moon
2016-02-19  6:06 ` Krzysztof Kozlowski
2016-02-19  6:39   ` Anand Moon
2016-02-19  7:20     ` Krzysztof Kozlowski
2016-02-19  8:10       ` Anand Moon
2016-02-19  8:15         ` Lars-Peter Clausen
2016-02-19  8:46           ` Anand Moon
2016-02-21 17:34           ` Anand Moon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox