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>
This commit is contained in:
parent
ab85b120e6
commit
d011c45081
@ -30,6 +30,7 @@
|
|||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
|
#include <linux/err.h>
|
||||||
|
|
||||||
#include "omap-usb.h"
|
#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);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
omap->uhh_base = devm_request_and_ioremap(dev, res);
|
omap->uhh_base = devm_ioremap_resource(dev, res);
|
||||||
if (!omap->uhh_base) {
|
if (IS_ERR(omap->uhh_base))
|
||||||
dev_err(dev, "Resource request/ioremap failed\n");
|
return PTR_ERR(omap->uhh_base);
|
||||||
return -EADDRNOTAVAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
omap->pdata = pdata;
|
omap->pdata = pdata;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user