public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: mtd: devices: convert to devm_ioremap_resource()
@ 2013-04-10 21:01 Silviu-Mihai Popescu
  2013-05-10 14:43 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Silviu-Mihai Popescu @ 2013-04-10 21:01 UTC (permalink / raw)
  To: linux-mtd
  Cc: David Woodhouse, Artem Bityutskiy, Philip Avinash,
	Peter Korsgaard, linux-kernel, Silviu-Mihai Popescu

Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@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.9.5


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

* Re: [PATCH] drivers: mtd: devices: convert to devm_ioremap_resource()
  2013-04-10 21:01 [PATCH] drivers: mtd: devices: convert to devm_ioremap_resource() Silviu-Mihai Popescu
@ 2013-05-10 14:43 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2013-05-10 14:43 UTC (permalink / raw)
  To: Silviu-Mihai Popescu
  Cc: linux-mtd, David Woodhouse, Philip Avinash, Peter Korsgaard,
	linux-kernel

On Thu, 2013-04-11 at 00:01 +0300, Silviu-Mihai Popescu wrote:
> Convert all uses of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
> 
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy


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

end of thread, other threads:[~2013-05-10 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10 21:01 [PATCH] drivers: mtd: devices: convert to devm_ioremap_resource() Silviu-Mihai Popescu
2013-05-10 14:43 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox