Commit d011c450814eb6b5418c84dd0cac8b6eb99c42dc
Committed by
Samuel Ortiz
1 parent
ab85b120e6
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 4 additions and 5 deletions Side-by-side Diff
drivers/mfd/omap-usb-host.c
... | ... | @@ -30,6 +30,7 @@ |
30 | 30 | #include <linux/pm_runtime.h> |
31 | 31 | #include <linux/of.h> |
32 | 32 | #include <linux/of_platform.h> |
33 | +#include <linux/err.h> | |
33 | 34 | |
34 | 35 | #include "omap-usb.h" |
35 | 36 | |
... | ... | @@ -608,11 +609,9 @@ |
608 | 609 | } |
609 | 610 | |
610 | 611 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
611 | - omap->uhh_base = devm_request_and_ioremap(dev, res); | |
612 | - if (!omap->uhh_base) { | |
613 | - dev_err(dev, "Resource request/ioremap failed\n"); | |
614 | - return -EADDRNOTAVAIL; | |
615 | - } | |
612 | + omap->uhh_base = devm_ioremap_resource(dev, res); | |
613 | + if (IS_ERR(omap->uhh_base)) | |
614 | + return PTR_ERR(omap->uhh_base); | |
616 | 615 | |
617 | 616 | omap->pdata = pdata; |
618 | 617 |