public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anand Moon <linux.amoon@gmail.com>
To: Vinod Koul <vinod.koul@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Anand Moon <linux.amoon@gmail.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] dmaengine: pl330: initialize tasklet after spin_unlock_irqrestore
Date: Thu, 18 Feb 2016 22:51:50 +0530	[thread overview]
Message-ID: <1455816110-2799-1-git-send-email-linux.amoon@gmail.com> (raw)

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

             reply	other threads:[~2016-02-18 17:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 17:21 Anand Moon [this message]
2016-02-19  6:06 ` [PATCH] dmaengine: pl330: initialize tasklet after spin_unlock_irqrestore 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455816110-2799-1-git-send-email-linux.amoon@gmail.com \
    --to=linux.amoon@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox