Commit 651da3d4 authored by Sachin Kamat's avatar Sachin Kamat Committed by Samuel Ortiz

mfd: omap-usb-tll: Convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() 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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent d011c450
...@@ -226,12 +226,9 @@ static int usbtll_omap_probe(struct platform_device *pdev) ...@@ -226,12 +226,9 @@ static int usbtll_omap_probe(struct platform_device *pdev)
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
tll->base = devm_request_and_ioremap(dev, res); tll->base = devm_ioremap_resource(dev, res);
if (!tll->base) { if (IS_ERR(tll->base))
ret = -EADDRNOTAVAIL; return PTR_ERR(tll->base);
dev_err(dev, "Resource request/ioremap failed:%d\n", ret);
return ret;
}
platform_set_drvdata(pdev, tll); platform_set_drvdata(pdev, tll);
pm_runtime_enable(dev); pm_runtime_enable(dev);
......
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