diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-02 15:28:09 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-08-09 07:12:03 +0200 |
commit | 2229c74079285c8f99754450e56d4d9814558e57 (patch) | |
tree | 80b5588202768a4ec677dffde575374cfb491976 /drivers/crypto/qcom-rng.c | |
parent | crypto: qce - use devm_platform_ioremap_resource() to simplify code (diff) | |
download | linux-2229c74079285c8f99754450e56d4d9814558e57.tar.xz linux-2229c74079285c8f99754450e56d4d9814558e57.zip |
crypto: qcom-rng - 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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qcom-rng.c')
-rw-r--r-- | drivers/crypto/qcom-rng.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/qcom-rng.c b/drivers/crypto/qcom-rng.c index e54249ccc009..4730f84b646d 100644 --- a/drivers/crypto/qcom-rng.c +++ b/drivers/crypto/qcom-rng.c @@ -153,7 +153,6 @@ static struct rng_alg qcom_rng_alg = { static int qcom_rng_probe(struct platform_device *pdev) { - struct resource *res; struct qcom_rng *rng; int ret; @@ -164,8 +163,7 @@ static int qcom_rng_probe(struct platform_device *pdev) platform_set_drvdata(pdev, rng); mutex_init(&rng->lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rng->base = devm_ioremap_resource(&pdev->dev, res); + rng->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rng->base)) return PTR_ERR(rng->base); |