diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-16 18:46:17 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-10-26 02:09:56 +1100 |
commit | 5b18f9ac9573f1c516e86dffb280156a31933fbf (patch) | |
tree | d35ba1a4c57bcadbcb3863351bb91f7a59310565 /drivers/char | |
parent | c7c16c58be1aa2d02780e884a48495fae5fdccb1 (diff) | |
download | linux-5b18f9ac9573f1c516e86dffb280156a31933fbf.tar.gz linux-5b18f9ac9573f1c516e86dffb280156a31933fbf.tar.bz2 linux-5b18f9ac9573f1c516e86dffb280156a31933fbf.zip |
hwrng: pasemi - use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hw_random/pasemi-rng.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c index 24b1460b49d4..2498d4ef9fe2 100644 --- a/drivers/char/hw_random/pasemi-rng.c +++ b/drivers/char/hw_random/pasemi-rng.c @@ -86,10 +86,8 @@ static struct hwrng pasemi_rng = { static int rng_probe(struct platform_device *pdev) { void __iomem *rng_regs; - struct resource *res; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rng_regs = devm_ioremap_resource(&pdev->dev, res); + rng_regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rng_regs)) return PTR_ERR(rng_regs); |