Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: <linux-crypto@vger.kernel.org>, <linux-omap@vger.kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>, <davem@davemloft.net>,
	<herbert@gondor.hengli.com.au>, <rnayak@ti.com>, <nsekhar@ti.com>,
	<joelf@ti.com>, <lokeshvutla@ti.com>
Subject: [PATCH 3/4] crypto: omap-sham: Convert to devm_request_irq()
Date: Fri, 26 Jul 2013 12:29:16 +0530	[thread overview]
Message-ID: <1374821957-30141-4-git-send-email-lokeshvutla@ti.com> (raw)
In-Reply-To: <1374821957-30141-1-git-send-email-lokeshvutla@ti.com>

Using devm_request_irq() rather than request_irq().
So removing free_irq() calls from the probe error
path and the remove handler.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 drivers/crypto/omap-sham.c |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index a6eb6a8..b82b140 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1896,10 +1896,11 @@ static int omap_sham_probe(struct platform_device *pdev)
 	}
 	dd->phys_base = res.start;
 
-	err = request_irq(dd->irq, dd->pdata->intr_hdlr, IRQF_TRIGGER_LOW,
-			  dev_name(dev), dd);
+	err = devm_request_irq(dev, dd->irq, dd->pdata->intr_hdlr,
+			       IRQF_TRIGGER_NONE, dev_name(dev), dd);
 	if (err) {
-		dev_err(dev, "unable to request irq.\n");
+		dev_err(dev, "unable to request irq %d, err = %d\n",
+			dd->irq, err);
 		goto res_err;
 	}
 
@@ -1912,7 +1913,7 @@ static int omap_sham_probe(struct platform_device *pdev)
 		dev_err(dev, "unable to obtain RX DMA engine channel %u\n",
 			dd->dma);
 		err = -ENXIO;
-		goto dma_err;
+		goto res_err;
 	}
 
 	dd->flags |= dd->pdata->flags;
@@ -1950,8 +1951,6 @@ err_algs:
 					&dd->pdata->algs_info[i].algs_list[j]);
 	pm_runtime_disable(dev);
 	dma_release_channel(dd->dma_lch);
-dma_err:
-	free_irq(dd->irq, dd);
 res_err:
 	kfree(dd);
 	dd = NULL;
@@ -1979,7 +1978,6 @@ static int omap_sham_remove(struct platform_device *pdev)
 	tasklet_kill(&dd->done_task);
 	pm_runtime_disable(&pdev->dev);
 	dma_release_channel(dd->dma_lch);
-	free_irq(dd->irq, dd);
 	kfree(dd);
 	dd = NULL;
 
-- 
1.7.9.5

  parent reply	other threads:[~2013-07-26  6:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26  6:59 [PATCH 0/4] crypto: omap-sham: Add support for SHA384/SHA512 for OMAP5/AM43xx Soc's Lokesh Vutla
2013-07-26  6:59 ` [PATCH 1/4] crypto: omap-sham: Add SHA384 and SHA512 Support Lokesh Vutla
2013-07-26  6:59 ` [PATCH 2/4] crypto: omap-sham: Add OMAP5/AM43XX SHAM Support Lokesh Vutla
2013-08-09 15:31   ` Mark Rutland
2013-07-26  6:59 ` Lokesh Vutla [this message]
2013-07-26  6:59 ` [PATCH 4/4] crypto: omap-sham: Convert to devm_kzalloc() Lokesh Vutla
2013-08-01  1:47 ` [PATCH 0/4] crypto: omap-sham: Add support for SHA384/SHA512 for OMAP5/AM43xx Soc's Herbert Xu

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=1374821957-30141-4-git-send-email-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.hengli.com.au \
    --cc=joelf@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=rnayak@ti.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