summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2019-06-06 18:13:48 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-06-13 08:31:41 +0200
commitcec1caaf3f62f8ed104e24c8b4b9c5dc0fd44e17 (patch)
treefc9069f47ff9655f3427c9d454be8e5d37bdabec
parentcrypto: hisilicon - Use the correct style for SPDX License Identifier (diff)
downloadlinux-cec1caaf3f62f8ed104e24c8b4b9c5dc0fd44e17.tar.xz
linux-cec1caaf3f62f8ed104e24c8b4b9c5dc0fd44e17.zip
crypto: mxs-dcp - 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/mxs-dcp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index b4429891e368..c385a746d1f4 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -992,8 +992,6 @@ static int mxs_dcp_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct dcp *sdcp = NULL;
int i, ret;
-
- struct resource *iores;
int dcp_vmi_irq, dcp_irq;
if (global_sdcp) {
@@ -1001,7 +999,6 @@ static int mxs_dcp_probe(struct platform_device *pdev)
return -ENODEV;
}
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dcp_vmi_irq = platform_get_irq(pdev, 0);
if (dcp_vmi_irq < 0) {
dev_err(dev, "Failed to get IRQ: (%d)!\n", dcp_vmi_irq);
@@ -1019,7 +1016,7 @@ static int mxs_dcp_probe(struct platform_device *pdev)
return -ENOMEM;
sdcp->dev = dev;
- sdcp->base = devm_ioremap_resource(dev, iores);
+ sdcp->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sdcp->base))
return PTR_ERR(sdcp->base);