* [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
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®