aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:06 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 15:21:46 -0500
commitbc5e6dea81b025aba8fecec5c18f6faf81db9562 (patch)
tree4668578d17393611b74c166d908578a2683b20aa /drivers/iommu
parentd4ed60259e16106566ca489f64ebbd8a379d8972 (diff)
iommu: 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: Joerg Roedel <joro@8bytes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/tegra-smmu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index fc178893789a..f08dbcd2f175 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -19,6 +19,7 @@
19 19
20#define pr_fmt(fmt) "%s(): " fmt, __func__ 20#define pr_fmt(fmt) "%s(): " fmt, __func__
21 21
22#include <linux/err.h>
22#include <linux/module.h> 23#include <linux/module.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/spinlock.h> 25#include <linux/spinlock.h>
@@ -1176,9 +1177,9 @@ static int tegra_smmu_probe(struct platform_device *pdev)
1176 res = platform_get_resource(pdev, IORESOURCE_MEM, i); 1177 res = platform_get_resource(pdev, IORESOURCE_MEM, i);
1177 if (!res) 1178 if (!res)
1178 return -ENODEV; 1179 return -ENODEV;
1179 smmu->regs[i] = devm_request_and_ioremap(&pdev->dev, res); 1180 smmu->regs[i] = devm_ioremap_resource(&pdev->dev, res);
1180 if (!smmu->regs[i]) 1181 if (IS_ERR(smmu->regs[i]))
1181 return -EBUSY; 1182 return PTR_ERR(smmu->regs[i]);
1182 } 1183 }
1183 1184
1184 err = of_get_dma_window(dev->of_node, NULL, 0, NULL, &base, &size); 1185 err = of_get_dma_window(dev->of_node, NULL, 0, NULL, &base, &size);