Commit f8dab557 authored by YueHaibing's avatar YueHaibing Committed by Herbert Xu

crypto: inside-secure - use devm_platform_ioremap_resource() to simplify code

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f78c7123
...@@ -999,7 +999,6 @@ static void safexcel_init_register_offsets(struct safexcel_crypto_priv *priv) ...@@ -999,7 +999,6 @@ static void safexcel_init_register_offsets(struct safexcel_crypto_priv *priv)
static int safexcel_probe(struct platform_device *pdev) static int safexcel_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *res;
struct safexcel_crypto_priv *priv; struct safexcel_crypto_priv *priv;
int i, ret; int i, ret;
...@@ -1015,8 +1014,7 @@ static int safexcel_probe(struct platform_device *pdev) ...@@ -1015,8 +1014,7 @@ static int safexcel_probe(struct platform_device *pdev)
safexcel_init_register_offsets(priv); safexcel_init_register_offsets(priv);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); priv->base = devm_platform_ioremap_resource(pdev, 0);
priv->base = devm_ioremap_resource(dev, res);
if (IS_ERR(priv->base)) { if (IS_ERR(priv->base)) {
dev_err(dev, "failed to get resource\n"); dev_err(dev, "failed to get resource\n");
return PTR_ERR(priv->base); return PTR_ERR(priv->base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment