2013-03-13 23:17:49

by Alexandru Gheorghiu

[permalink] [raw]
Subject: [PATCH] drivers: dma: Use devm_ioremap_resource

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

Signed-off-by: Alexandru Gheorghiu <[email protected]>
---
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


2013-03-14 04:02:12

by Sachin Kamat

[permalink] [raw]
Subject: Re: [PATCH] drivers: dma: Use devm_ioremap_resource

On 14 March 2013 04:47, Alexandru Gheorghiu <[email protected]> wrote:
> Replaced call to devm_request_and_ioremap with devm_ioremap_resource which
> provides better error handling.
>
> Signed-off-by: Alexandru Gheorghiu <[email protected]>
> ---

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