diff mbox series

[1/9] memory: emif: convert to devm_platform_ioremap_resource

Message ID 20191222185034.4665-1-tiny.windzz@gmail.com (mailing list archive)
State Not Applicable
Headers show
Series [1/9] memory: emif: convert to devm_platform_ioremap_resource | expand

Commit Message

Yangtao Li Dec. 22, 2019, 6:50 p.m. UTC
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/memory/emif.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index 9d9127bf2a59..9a8463716a54 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1537,7 +1537,6 @@  static struct emif_data *__init_or_module get_device_details(
 static int __init_or_module emif_probe(struct platform_device *pdev)
 {
 	struct emif_data	*emif;
-	struct resource		*res;
 	int			irq;
 
 	if (pdev->dev.of_node)
@@ -1557,8 +1556,7 @@  static int __init_or_module emif_probe(struct platform_device *pdev)
 	emif->dev = &pdev->dev;
 	platform_set_drvdata(pdev, emif);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	emif->base = devm_ioremap_resource(emif->dev, res);
+	emif->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(emif->base))
 		goto error;