Commit bcc7fa95 authored by Sachin Kamat's avatar Sachin Kamat Committed by Vinod Koul

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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent d86b2f29
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_dma.h> #include <linux/of_dma.h>
#include <linux/err.h>
#include "dmaengine.h" #include "dmaengine.h"
#define PL330_MAX_CHAN 8 #define PL330_MAX_CHAN 8
...@@ -2903,9 +2904,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) ...@@ -2903,9 +2904,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
pi->mcbufsz = pdat ? pdat->mcbuf_sz : 0; pi->mcbufsz = pdat ? pdat->mcbuf_sz : 0;
res = &adev->res; res = &adev->res;
pi->base = devm_request_and_ioremap(&adev->dev, res); pi->base = devm_ioremap_resource(&adev->dev, res);
if (!pi->base) if (IS_ERR(pi->base))
return -ENXIO; return PTR_ERR(pi->base);
amba_set_drvdata(adev, pdmac); amba_set_drvdata(adev, pdmac);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment