diff options
author | Laurent Navet <laurent.navet@gmail.com> | 2013-05-02 08:00:38 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-05-24 05:55:28 -0400 |
commit | 30862281f717835ec06eca9aeb2b3ddc3da33bc1 (patch) | |
tree | 98b380563a28cc40cc4672eb7ba3b3a795715203 | |
parent | 39761214eefc6b070f29402aa1165f24d789b3f7 (diff) |
drivers: crypto: use devm_ioremap_resource()
Replace calls to deprecated devm_request_and_ioremap by devm_ioremap_resource.
Found with coccicheck and this semantic patch:
scripts/coccinelle/api/devm_request_and_ioremap.cocci.
Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/omap-aes.c | 7 | ||||
-rw-r--r-- | drivers/crypto/omap-sham.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index ee15b0f7849a..305a2aacf9b3 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c | |||
@@ -1125,10 +1125,9 @@ static int omap_aes_probe(struct platform_device *pdev) | |||
1125 | if (err) | 1125 | if (err) |
1126 | goto err_res; | 1126 | goto err_res; |
1127 | 1127 | ||
1128 | dd->io_base = devm_request_and_ioremap(dev, &res); | 1128 | dd->io_base = devm_ioremap_resource(dev, &res); |
1129 | if (!dd->io_base) { | 1129 | if (IS_ERR(dd->io_base)) { |
1130 | dev_err(dev, "can't ioremap\n"); | 1130 | err = PTR_ERR(dd->io_base); |
1131 | err = -ENOMEM; | ||
1132 | goto err_res; | 1131 | goto err_res; |
1133 | } | 1132 | } |
1134 | dd->phys_base = res.start; | 1133 | dd->phys_base = res.start; |
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index a1e1b4756ee5..4bb67652c200 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c | |||
@@ -1686,10 +1686,9 @@ static int omap_sham_probe(struct platform_device *pdev) | |||
1686 | if (err) | 1686 | if (err) |
1687 | goto res_err; | 1687 | goto res_err; |
1688 | 1688 | ||
1689 | dd->io_base = devm_request_and_ioremap(dev, &res); | 1689 | dd->io_base = devm_ioremap_resource(dev, &res); |
1690 | if (!dd->io_base) { | 1690 | if (IS_ERR(dd->io_base)) { |
1691 | dev_err(dev, "can't ioremap\n"); | 1691 | err = PTR_ERR(dd->io_base); |
1692 | err = -ENOMEM; | ||
1693 | goto res_err; | 1692 | goto res_err; |
1694 | } | 1693 | } |
1695 | dd->phys_base = res.start; | 1694 | dd->phys_base = res.start; |