diff options
author | LEROY Christophe <christophe.leroy@c-s.fr> | 2017-10-06 15:04:53 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-10-12 22:55:31 +0800 |
commit | fd5ea7f011932d121e89e470992aaff8547c761f (patch) | |
tree | 2c38a5098217be684670006b0cb4d79d42f253da /drivers | |
parent | fa14c6cfcecb0011d53d77c5deb94b70d3738c44 (diff) |
crypto: talitos - use devm_ioremap()
Use devm_ioremap()
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/talitos.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index f139a0cef2e2..83b2a70a1ba7 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -3008,8 +3008,6 @@ static int talitos_remove(struct platform_device *ofdev) if (priv->irq[1]) tasklet_kill(&priv->done_task[1]); - iounmap(priv->reg); - return 0; } @@ -3160,6 +3158,7 @@ static int talitos_probe(struct platform_device *ofdev) struct talitos_private *priv; int i, err; int stride; + struct resource *res; priv = devm_kzalloc(dev, sizeof(struct talitos_private), GFP_KERNEL); if (!priv) @@ -3173,7 +3172,10 @@ static int talitos_probe(struct platform_device *ofdev) spin_lock_init(&priv->reg_lock); - priv->reg = of_iomap(np, 0); + res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); + if (!res) + return -ENXIO; + priv->reg = devm_ioremap(dev, res->start, resource_size(res)); if (!priv->reg) { dev_err(dev, "failed to of_iomap\n"); err = -ENOMEM; |