summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2019-06-06 13:13:49 -0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-06-13 14:31:41 +0800
commitb0d765219fb3308638754e28f71377d3752f1266 (patch)
treef1e3ffcdbe71441eb13cde8c8d02d994365d4214
parentcec1caaf3f62f8ed104e24c8b4b9c5dc0fd44e17 (diff)
downloadlinux-b0d765219fb3308638754e28f71377d3752f1266.tar.bz2
crypto: sahara - Use devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify the code a bit. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/sahara.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index fd11162a915e..616fdc9f1816 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -1387,7 +1387,6 @@ MODULE_DEVICE_TABLE(of, sahara_dt_ids);
static int sahara_probe(struct platform_device *pdev)
{
struct sahara_dev *dev;
- struct resource *res;
u32 version;
int irq;
int err;
@@ -1401,8 +1400,7 @@ static int sahara_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, dev);
/* Get the base address */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dev->regs_base = devm_ioremap_resource(&pdev->dev, res);
+ dev->regs_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dev->regs_base))
return PTR_ERR(dev->regs_base);