diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-05 15:21:54 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-07-20 22:16:24 +1200 |
commit | aa4b2f9ea53e9fc93f9d30746c32af5ac25f2a46 (patch) | |
tree | 4e462cf252b85be7b351c2f62da71cfd6ebf55d0 /drivers/crypto | |
parent | ac0042fa5aa5ac7929d95f4bf9185429ccdb70cb (diff) | |
download | linux-stable-aa4b2f9ea53e9fc93f9d30746c32af5ac25f2a46.tar.gz linux-stable-aa4b2f9ea53e9fc93f9d30746c32af5ac25f2a46.tar.bz2 linux-stable-aa4b2f9ea53e9fc93f9d30746c32af5ac25f2a46.zip |
crypto: omap-des - Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/omap-des.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index f783769ea110..371a51094e34 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -971,18 +971,12 @@ static int omap_des_probe(struct platform_device *pdev) dd->dev = dev; platform_set_drvdata(pdev, dd); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "no MEM resource info\n"); - goto err_res; - } - err = (dev->of_node) ? omap_des_get_of(dd, pdev) : omap_des_get_pdev(dd, pdev); if (err) goto err_res; - dd->io_base = devm_ioremap_resource(dev, res); + dd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(dd->io_base)) { err = PTR_ERR(dd->io_base); goto err_res; |