aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/omap-usb-host.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-09 06:46:36 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-04-09 09:01:31 -0400
commitd011c450814eb6b5418c84dd0cac8b6eb99c42dc (patch)
treed30a17253a7150bc6ee2e8ea396618745bcb9728 /drivers/mfd/omap-usb-host.c
parentab85b120e6925203e4b63022166eacac19009380 (diff)
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 <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-host.c')
-rw-r--r--drivers/mfd/omap-usb-host.c9
1 files changed, 4 insertions, 5 deletions
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 @@
30#include <linux/pm_runtime.h> 30#include <linux/pm_runtime.h>
31#include <linux/of.h> 31#include <linux/of.h>
32#include <linux/of_platform.h> 32#include <linux/of_platform.h>
33#include <linux/err.h>
33 34
34#include "omap-usb.h" 35#include "omap-usb.h"
35 36
@@ -608,11 +609,9 @@ static int usbhs_omap_probe(struct platform_device *pdev)
608 } 609 }
609 610
610 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 611 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
611 omap->uhh_base = devm_request_and_ioremap(dev, res); 612 omap->uhh_base = devm_ioremap_resource(dev, res);
612 if (!omap->uhh_base) { 613 if (IS_ERR(omap->uhh_base))
613 dev_err(dev, "Resource request/ioremap failed\n"); 614 return PTR_ERR(omap->uhh_base);
614 return -EADDRNOTAVAIL;
615 }
616 615
617 omap->pdata = pdata; 616 omap->pdata = pdata;
618 617