mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: dma: Use devm_ioremap_resource
@ 2013-03-13 23:17 Alexandru Gheorghiu
  2013-03-14  4:02 ` Sachin Kamat
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-13 23:17 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Dan Williams, linux-kernel, Alexandru Gheorghiu

Replaced call to devm_request_and_ioremap with devm_ioremap_resource which
provides better error handling.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
 drivers/dma/pl330.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 7181531..c0a81fb 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2904,9 +2904,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
 	pi->mcbufsz = pdat ? pdat->mcbuf_sz : 0;
 
 	res = &adev->res;
-	pi->base = devm_request_and_ioremap(&adev->dev, res);
-	if (!pi->base)
-		return -ENXIO;
+	pi->base = devm_ioremap_resource(&adev->dev, res);
+	if (IS_ERR(pi->base))
+		return PTR_ERR(pi->base);
 
 	amba_set_drvdata(adev, pdmac);
 
-- 
1.7.9.5


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

* Re: [PATCH] drivers: dma: Use devm_ioremap_resource
  2013-03-13 23:17 [PATCH] drivers: dma: Use devm_ioremap_resource Alexandru Gheorghiu
@ 2013-03-14  4:02 ` Sachin Kamat
  0 siblings, 0 replies; 2+ messages in thread
From: Sachin Kamat @ 2013-03-14  4:02 UTC (permalink / raw)
  To: Alexandru Gheorghiu; +Cc: Vinod Koul, Dan Williams, linux-kernel

On 14 March 2013 04:47, Alexandru Gheorghiu <gheorghiuandru@gmail.com> wrote:
> Replaced call to devm_request_and_ioremap with devm_ioremap_resource which
> provides better error handling.
>
> Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
> ---

Already sent a similar patch to do this:
https://patchwork.kernel.org/patch/2211801/

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

end of thread, other threads:[~2013-03-14  4:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-13 23:17 [PATCH] drivers: dma: Use devm_ioremap_resource Alexandru Gheorghiu
2013-03-14  4:02 ` Sachin Kamat

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

all inboxes | Powered by JetHome®