From: Sachin Kamat Date: Tue, 9 Apr 2013 10:46:36 +0000 (+0530) Subject: mfd: omap-usb-host: Convert to devm_ioremap_resource() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d011c450814eb6b5418c84dd0cac8b6eb99c42dc;p=linux-beck.git mfd: omap-usb-host: 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-host.c b/drivers/mfd/omap-usb-host.c index d3b6e9491b62..759fae3ca7fb 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "omap-usb.h" @@ -608,11 +609,9 @@ static int usbhs_omap_probe(struct platform_device *pdev) } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - omap->uhh_base = devm_request_and_ioremap(dev, res); - if (!omap->uhh_base) { - dev_err(dev, "Resource request/ioremap failed\n"); - return -EADDRNOTAVAIL; - } + omap->uhh_base = devm_ioremap_resource(dev, res); + if (IS_ERR(omap->uhh_base)) + return PTR_ERR(omap->uhh_base); omap->pdata = pdata;