提交 651da3d4 编写于 作者: S Sachin Kamat 提交者: 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: NSachin Kamat <sachin.kamat@linaro.org>
Acked-by: NRoger Quadros <rogerq@ti.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册