diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-02 15:28:00 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-08-09 07:11:59 +0200 |
commit | 6d1c0186f392e77b9e873490bed4d27b2fe580d7 (patch) | |
tree | c3af680e982546daf027057acf5985dc8cc39cc9 /drivers/crypto/exynos-rng.c | |
parent | crypto: ccp - use devm_platform_ioremap_resource() to simplify code (diff) | |
download | linux-6d1c0186f392e77b9e873490bed4d27b2fe580d7.tar.xz linux-6d1c0186f392e77b9e873490bed4d27b2fe580d7.zip |
crypto: exynos - 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: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r-- | drivers/crypto/exynos-rng.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/exynos-rng.c b/drivers/crypto/exynos-rng.c index 2cfabb99cb6e..cbd8ca6e52ee 100644 --- a/drivers/crypto/exynos-rng.c +++ b/drivers/crypto/exynos-rng.c @@ -268,7 +268,6 @@ static struct rng_alg exynos_rng_alg = { static int exynos_rng_probe(struct platform_device *pdev) { struct exynos_rng_dev *rng; - struct resource *res; int ret; if (exynos_rng_dev) @@ -289,8 +288,7 @@ static int exynos_rng_probe(struct platform_device *pdev) return PTR_ERR(rng->clk); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rng->mem = devm_ioremap_resource(&pdev->dev, res); + rng->mem = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rng->mem)) return PTR_ERR(rng->mem); |