From 06303c2e00701724acb95069ca46f87c998c4be1 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:08 +0100 Subject: memory: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/memory/tegra30-mc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/memory/tegra30-mc.c') diff --git a/drivers/memory/tegra30-mc.c b/drivers/memory/tegra30-mc.c index 0b7ab9332a18..0b975986777d 100644 --- a/drivers/memory/tegra30-mc.c +++ b/drivers/memory/tegra30-mc.c @@ -17,6 +17,7 @@ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. */ +#include #include #include #include @@ -336,9 +337,9 @@ static int tegra30_mc_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, i); if (!res) return -ENODEV; - mc->regs[i] = devm_request_and_ioremap(&pdev->dev, res); - if (!mc->regs[i]) - return -EBUSY; + mc->regs[i] = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(mc->regs[i])) + return PTR_ERR(mc->regs[i]); } irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); -- cgit v1.2.3