summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2019-07-17 17:04:37 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-07-27 21:08:32 +1000
commitd10d094cbfd338f361a83a82e5d99feb7933008d (patch)
treed69a48186783bfc8bbd8d442ff7b1466e0c776ff /drivers
parent72c8117adfced37df101c8c0b3f363e0906f83f0 (diff)
downloadlinux-d10d094cbfd338f361a83a82e5d99feb7933008d.tar.bz2
hwrng: imx-rngc - use devm_platform_ioremap_resource() to simplify code
Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hw_random/imx-rngc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c
index 69f537980004..30cf00f8e9a0 100644
--- a/drivers/char/hw_random/imx-rngc.c
+++ b/drivers/char/hw_random/imx-rngc.c
@@ -196,7 +196,6 @@ static int imx_rngc_init(struct hwrng *rng)
static int imx_rngc_probe(struct platform_device *pdev)
{
struct imx_rngc *rngc;
- struct resource *res;
int ret;
int irq;
@@ -204,8 +203,7 @@ static int imx_rngc_probe(struct platform_device *pdev)
if (!rngc)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- rngc->base = devm_ioremap_resource(&pdev->dev, res);
+ rngc->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rngc->base))
return PTR_ERR(rngc->base);