From: Varun Wadekar <vwadekar@nvidia.com>
To: Jingoo Han <jg1.han@samsung.com>,
'Herbert Xu' <herbert@gondor.apana.org.au>
Cc: 'David Miller' <davem@davemloft.net>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
'Stephen Warren' <swarren@wwwdotorg.org>,
'Thierry Reding' <thierry.reding@gmail.com>
Subject: RE: [PATCH 4/4] crypto: tegra-aes - Use devm_ioremap_resource()
Date: Wed, 12 Feb 2014 10:01:22 +0530 [thread overview]
Message-ID: <A8BD086EC2BB774E8EBDDFB12114CB2A6CCF4E060A@BGMAIL02.nvidia.com> (raw)
In-Reply-To: <000601cf27aa$a8aa4b50$f9fee1f0$%han@samsung.com>
Looks good. Please add my ACK.
Thanks.
-----Original Message-----
From: Jingoo Han [mailto:jg1.han@samsung.com]
Sent: Wednesday, February 12, 2014 9:57 AM
To: 'Herbert Xu'
Cc: 'David Miller'; linux-crypto@vger.kernel.org; 'Jingoo Han'; 'Stephen Warren'; 'Thierry Reding'; Varun Wadekar
Subject: [PATCH 4/4] crypto: tegra-aes - Use devm_ioremap_resource()
Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because the value is checked by devm_ioremap_resource().
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/crypto/tegra-aes.c | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index 060eecc..fa3dc14 100644
--- a/drivers/crypto/tegra-aes.c
+++ b/drivers/crypto/tegra-aes.c
@@ -896,23 +896,9 @@ static int tegra_aes_probe(struct platform_device *pdev)
/* Get the module base address */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "invalid resource type: base\n");
- err = -ENODEV;
- goto out;
- }
-
- if (!devm_request_mem_region(&pdev->dev, res->start,
- resource_size(res),
- dev_name(&pdev->dev))) {
- dev_err(&pdev->dev, "Couldn't request MEM resource\n");
- return -ENODEV;
- }
-
- dd->io_base = devm_ioremap(dev, res->start, resource_size(res));
- if (!dd->io_base) {
- dev_err(dev, "can't ioremap register space\n");
- err = -ENOMEM;
+ dd->io_base = devm_ioremap_resource(dev, res);
+ if (IS_ERR(dd->io_base)) {
+ err = PTR_ERR(dd->io_base);
goto out;
}
--
1.7.10.4
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
next prev parent reply other threads:[~2014-02-12 4:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 4:22 [PATCH 1/4] crypto: picoxcell - Use devm_ioremap_resource() Jingoo Han
2014-02-12 4:23 ` [PATCH 2/4] crypto: sahara " Jingoo Han
2014-02-12 4:24 ` [PATCH 3/4] crypto: s5p-sss " Jingoo Han
2014-02-12 4:26 ` [PATCH 4/4] crypto: tegra-aes " Jingoo Han
2014-02-12 4:31 ` Varun Wadekar [this message]
2014-02-12 4:28 ` [PATCH 1/4] crypto: picoxcell " Jingoo Han
2014-02-25 12:17 ` 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=A8BD086EC2BB774E8EBDDFB12114CB2A6CCF4E060A@BGMAIL02.nvidia.com \
--to=vwadekar@nvidia.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jg1.han@samsung.com \
--cc=linux-crypto@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.