]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers: crypto: use devm_ioremap_resource()
authorLaurent Navet <laurent.navet@gmail.com>
Thu, 2 May 2013 12:00:38 +0000 (14:00 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 May 2013 06:54:59 +0000 (14:54 +0800)
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>
drivers/crypto/omap-aes.c
drivers/crypto/omap-sham.c

index ee15b0f7849ad567d74cd70a9e125f20fe4f1814..305a2aacf9b35d7a23de7b448d70bbdc9ba5de08 100644 (file)
@@ -1125,10 +1125,9 @@ static int omap_aes_probe(struct platform_device *pdev)
        if (err)
                goto err_res;
 
-       dd->io_base = devm_request_and_ioremap(dev, &res);
-       if (!dd->io_base) {
-               dev_err(dev, "can't ioremap\n");
-               err = -ENOMEM;
+       dd->io_base = devm_ioremap_resource(dev, &res);
+       if (IS_ERR(dd->io_base)) {
+               err = PTR_ERR(dd->io_base);
                goto err_res;
        }
        dd->phys_base = res.start;
index a1e1b4756ee5e62391e743397b99260221f412da..4bb67652c2005ea46cf2677172665f8a261e58e3 100644 (file)
@@ -1686,10 +1686,9 @@ static int omap_sham_probe(struct platform_device *pdev)
        if (err)
                goto res_err;
 
-       dd->io_base = devm_request_and_ioremap(dev, &res);
-       if (!dd->io_base) {
-               dev_err(dev, "can't ioremap\n");
-               err = -ENOMEM;
+       dd->io_base = devm_ioremap_resource(dev, &res);
+       if (IS_ERR(dd->io_base)) {
+               err = PTR_ERR(dd->io_base);
                goto res_err;
        }
        dd->phys_base = res.start;