diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-04-09 06:46:37 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-04-09 09:01:31 -0400 |
commit | 651da3d4026ece555853694f51dbad566f113793 (patch) | |
tree | 9a466e8a7eb7a67cc624fc715c569ea2579f059d /drivers/mfd/omap-usb-tll.c | |
parent | d011c450814eb6b5418c84dd0cac8b6eb99c42dc (diff) |
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: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/omap-usb-tll.c')
-rw-r--r-- | drivers/mfd/omap-usb-tll.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 8f4d5a1fcd1a..e59ac4cbac96 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c | |||
@@ -226,12 +226,9 @@ static int usbtll_omap_probe(struct platform_device *pdev) | |||
226 | } | 226 | } |
227 | 227 | ||
228 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 228 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
229 | tll->base = devm_request_and_ioremap(dev, res); | 229 | tll->base = devm_ioremap_resource(dev, res); |
230 | if (!tll->base) { | 230 | if (IS_ERR(tll->base)) |
231 | ret = -EADDRNOTAVAIL; | 231 | return PTR_ERR(tll->base); |
232 | dev_err(dev, "Resource request/ioremap failed:%d\n", ret); | ||
233 | return ret; | ||
234 | } | ||
235 | 232 | ||
236 | platform_set_drvdata(pdev, tll); | 233 | platform_set_drvdata(pdev, tll); |
237 | pm_runtime_enable(dev); | 234 | pm_runtime_enable(dev); |