Commit 17729e56 authored by YueHaibing's avatar YueHaibing Committed by Herbert Xu

crypto: ccp - 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>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0866ba23
...@@ -125,7 +125,6 @@ static int sp_platform_probe(struct platform_device *pdev) ...@@ -125,7 +125,6 @@ static int sp_platform_probe(struct platform_device *pdev)
struct sp_platform *sp_platform; struct sp_platform *sp_platform;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
enum dev_dma_attr attr; enum dev_dma_attr attr;
struct resource *ior;
int ret; int ret;
ret = -ENOMEM; ret = -ENOMEM;
...@@ -146,8 +145,7 @@ static int sp_platform_probe(struct platform_device *pdev) ...@@ -146,8 +145,7 @@ static int sp_platform_probe(struct platform_device *pdev)
goto e_err; goto e_err;
} }
ior = platform_get_resource(pdev, IORESOURCE_MEM, 0); sp->io_map = devm_platform_ioremap_resource(pdev, 0);
sp->io_map = devm_ioremap_resource(dev, ior);
if (IS_ERR(sp->io_map)) { if (IS_ERR(sp->io_map)) {
ret = PTR_ERR(sp->io_map); ret = PTR_ERR(sp->io_map);
goto e_err; goto e_err;
......
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