summaryrefslogtreecommitdiff
path: root/drivers/crypto/stm32/stm32-cryp.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-08-02 21:28:07 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-08-09 15:12:02 +1000
commit473b4d995963b158f1713274c7992aed9240eb45 (patch)
tree33c33b0e14d64cd2eca0aacc21fcb621c2ced980 /drivers/crypto/stm32/stm32-cryp.c
parent721744730ab06079df8197a700dc8929dadfcebc (diff)
crypto: stm32 - 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> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/stm32/stm32-cryp.c')
-rw-r--r--drivers/crypto/stm32/stm32-cryp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/stm32/stm32-cryp.c b/drivers/crypto/stm32/stm32-cryp.c
index 72f86063b046..5cf6679da580 100644
--- a/drivers/crypto/stm32/stm32-cryp.c
+++ b/drivers/crypto/stm32/stm32-cryp.c
@@ -1955,7 +1955,6 @@ static int stm32_cryp_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct stm32_cryp *cryp;
- struct resource *res;
struct reset_control *rst;
int irq, ret;
@@ -1969,8 +1968,7 @@ static int stm32_cryp_probe(struct platform_device *pdev)
cryp->dev = dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- cryp->regs = devm_ioremap_resource(dev, res);
+ cryp->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(cryp->regs))
return PTR_ERR(cryp->regs);