diff mbox series

[1/2] crypto: mxs-dcp - Use devm_platform_ioremap_resource()

Message ID 20190606161349.5227-1-festevam@gmail.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [1/2] crypto: mxs-dcp - Use devm_platform_ioremap_resource() | expand

Commit Message

Fabio Estevam June 6, 2019, 4:13 p.m. UTC
Use devm_platform_ioremap_resource() to simplify the code a bit.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/crypto/mxs-dcp.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Herbert Xu June 13, 2019, 6:57 a.m. UTC | #1
On Thu, Jun 06, 2019 at 01:13:48PM -0300, Fabio Estevam wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  drivers/crypto/mxs-dcp.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

All applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index bdc4c42d3ac8..f1fa637cb029 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -986,8 +986,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) {
@@ -995,7 +993,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);
@@ -1013,7 +1010,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);