All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: mtd: devices: elm: use devm_ioremap_resource()
@ 2013-05-02 15:09 ` Laurent Navet
  0 siblings, 0 replies; 4+ messages in thread
From: Laurent Navet @ 2013-05-02 15:09 UTC (permalink / raw)
  To: dwmw2
  Cc: artem.bityutskiy, avinashphilip, jacmet, linux-mtd, linux-kernel,
	Laurent Navet

Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

Found with coccicheck and this semantic patch:
 scripts/coccinelle/api/devm_request_and_ioremap.cocci.

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/mtd/devices/elm.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index 2ec5da9..2bafb06 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -344,9 +344,9 @@ static int elm_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	info->elm_base = devm_request_and_ioremap(&pdev->dev, res);
-	if (!info->elm_base)
-		return -EADDRNOTAVAIL;
+	info->elm_base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(info->elm_base))
+		return PTR_ERR(info->elm_base);
 
 	ret = devm_request_irq(&pdev->dev, irq->start, elm_isr, 0,
 			pdev->name, info);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-29 12:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 15:09 [PATCH] drivers: mtd: devices: elm: use devm_ioremap_resource() Laurent Navet
2013-05-02 15:09 ` Laurent Navet
2013-05-29 12:40 ` Artem Bityutskiy
2013-05-29 12:40   ` Artem Bityutskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.