From: Sachin Kamat Date: Tue, 9 Apr 2013 10:46:37 +0000 (+0530) Subject: mfd: omap-usb-tll: Convert to devm_ioremap_resource() X-Git-Tag: upstream/snapshot3+hdmi~5184^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=651da3d4026ece555853694f51dbad566f113793;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Roger Quadros Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 8f4d5a1..e59ac4c 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) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tll->base = devm_request_and_ioremap(dev, res); - if (!tll->base) { - ret = -EADDRNOTAVAIL; - dev_err(dev, "Resource request/ioremap failed:%d\n", ret); - return ret; - } + tll->base = devm_ioremap_resource(dev, res); + if (IS_ERR(tll->base)) + return PTR_ERR(tll->base); platform_set_drvdata(pdev, tll); pm_runtime_enable(dev);