summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-03-04 10:06:27 +0100
committerVinod Koul <vinod.koul@intel.com>2013-04-15 06:21:18 +0200
commitbcc7fa9547e7fa3b2f9b54f83ff10cd59f0f9fc6 (patch)
tree4d186505637bf81f31da3bb223cfb622de8148ae /drivers/dma
parentdmatest: append verify result to results (diff)
downloadlinux-bcc7fa9547e7fa3b2f9b54f83ff10cd59f0f9fc6.tar.xz
linux-bcc7fa9547e7fa3b2f9b54f83ff10cd59f0f9fc6.zip
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 <sachin.kamat@linaro.org> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pl330.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 31619c08a760..a17553f7c028 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -26,6 +26,7 @@
#include <linux/scatterlist.h>
#include <linux/of.h>
#include <linux/of_dma.h>
+#include <linux/err.h>
#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);