diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-02 16:28:02 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-08-09 08:12:00 +0300 |
commit | f8dab5575b76ea01b300e4b3a145955763ed61a9 (patch) | |
tree | ff59a6ddfbc0262acd4d1a944be72c57cf207d11 /drivers | |
parent | f78c7123ff4cfb90572633d79d85e20f29f87112 (diff) | |
download | linux-f8dab5575b76ea01b300e4b3a145955763ed61a9.tar.xz |
crypto: inside-secure - 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>
Acked-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/inside-secure/safexcel.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c index d1f60fd7e91a..822744dc9c21 100644 --- a/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c @@ -999,7 +999,6 @@ static void safexcel_init_register_offsets(struct safexcel_crypto_priv *priv) static int safexcel_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct safexcel_crypto_priv *priv; int i, ret; @@ -1015,8 +1014,7 @@ static int safexcel_probe(struct platform_device *pdev) safexcel_init_register_offsets(priv); - 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)) { dev_err(dev, "failed to get resource\n"); return PTR_ERR(priv->base); |