From: Sachin Kamat Date: Mon, 4 Mar 2013 09:06:27 +0000 (+0530) Subject: dma: pl330: Convert to devm_ioremap_resource() X-Git-Tag: next-20130404~73^2~1^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dae4d1ddb352a0c240575886bb7b3920b3a8cafc;p=karo-tx-linux.git dma: pl330: Convert to devm_ioremap_resource() Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat Reviewed-by: Thierry Reding Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 14fd122eb778..345e2a1915ec 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "dmaengine.h" #define PL330_MAX_CHAN 8 @@ -2903,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);