summaryrefslogtreecommitdiff
path: root/drivers/staging/omap-thermal
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 10:09:19 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 19:41:57 (GMT)
commit97f4be60178fec663baaa30a09ae102fd33373c2 (patch)
tree672ee4161bc389ec4840c413e4609ee779edba84 /drivers/staging/omap-thermal
parent8cbce1e5f00ec68ee1c99f57db98c892db227629 (diff)
downloadlinux-fsl-qoriq-97f4be60178fec663baaa30a09ae102fd33373c2.tar.xz
staging: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() 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: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/omap-thermal')
-rw-r--r--drivers/staging/omap-thermal/omap-bandgap.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c
index 8346e345..21fd91b 100644
--- a/drivers/staging/omap-thermal/omap-bandgap.c
+++ b/drivers/staging/omap-thermal/omap-bandgap.c
@@ -820,15 +820,12 @@ static struct omap_bandgap *omap_bandgap_build(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
if (!res)
break;
- chunk = devm_request_and_ioremap(&pdev->dev, res);
+ chunk = devm_ioremap_resource(&pdev->dev, res);
if (i == 0)
bg_ptr->base = chunk;
- if (!chunk) {
- dev_err(&pdev->dev,
- "failed to request the IO (%d:%pR).\n",
- i, res);
- return ERR_PTR(-EADDRNOTAVAIL);
- }
+ if (IS_ERR(chunk))
+ return ERR_CAST(chunk);
+
i++;
} while (res);