diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 15:21:46 -0500 |
commit | 7331205a9662a730799470fdd9ecbff0ea073606 (patch) | |
tree | b314ae443a4b788456a44237a4fdadf3dd27c25f /drivers/dma/tegra20-apb-dma.c | |
parent | 93316e263a321de6ef268a2a66c322626bd65cf1 (diff) |
dma: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma/tegra20-apb-dma.c')
-rw-r--r-- | drivers/dma/tegra20-apb-dma.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index c39e61bc8172..7d6d8b4679e9 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/dmaengine.h> | 22 | #include <linux/dmaengine.h> |
23 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
24 | #include <linux/err.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
26 | #include <linux/io.h> | 27 | #include <linux/io.h> |
@@ -1236,12 +1237,9 @@ static int tegra_dma_probe(struct platform_device *pdev) | |||
1236 | return -EINVAL; | 1237 | return -EINVAL; |
1237 | } | 1238 | } |
1238 | 1239 | ||
1239 | tdma->base_addr = devm_request_and_ioremap(&pdev->dev, res); | 1240 | tdma->base_addr = devm_ioremap_resource(&pdev->dev, res); |
1240 | if (!tdma->base_addr) { | 1241 | if (IS_ERR(tdma->base_addr)) |
1241 | dev_err(&pdev->dev, | 1242 | return PTR_ERR(tdma->base_addr); |
1242 | "Cannot request memregion/iomap dma address\n"); | ||
1243 | return -EADDRNOTAVAIL; | ||
1244 | } | ||
1245 | 1243 | ||
1246 | tdma->dma_clk = devm_clk_get(&pdev->dev, NULL); | 1244 | tdma->dma_clk = devm_clk_get(&pdev->dev, NULL); |
1247 | if (IS_ERR(tdma->dma_clk)) { | 1245 | if (IS_ERR(tdma->dma_clk)) { |