diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-16 12:46:16 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-10-25 17:09:56 +0200 |
commit | c7c16c58be1aa2d02780e884a48495fae5fdccb1 (patch) | |
tree | 058b49df85073410f13d39256e46dad3f0d2fe78 /drivers | |
parent | hwrng: npcm - use devm_platform_ioremap_resource() to simplify code (diff) | |
download | linux-c7c16c58be1aa2d02780e884a48495fae5fdccb1.tar.xz linux-c7c16c58be1aa2d02780e884a48495fae5fdccb1.zip |
hwrng: omap - 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')
-rw-r--r-- | drivers/char/hw_random/omap-rng.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index e329f82c0467..0ed07d16ec8e 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c @@ -439,7 +439,6 @@ static int get_omap_rng_device_details(struct omap_rng_dev *omap_rng) static int omap_rng_probe(struct platform_device *pdev) { struct omap_rng_dev *priv; - struct resource *res; struct device *dev = &pdev->dev; int ret; @@ -456,8 +455,7 @@ static int omap_rng_probe(struct platform_device *pdev) platform_set_drvdata(pdev, priv); priv->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) { ret = PTR_ERR(priv->base); goto err_ioremap; |