diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:19 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 11:41:57 -0800 |
commit | 97f4be60178fec663baaa30a09ae102fd33373c2 (patch) | |
tree | 672ee4161bc389ec4840c413e4609ee779edba84 /drivers/staging/omap-thermal | |
parent | 8cbce1e5f00ec68ee1c99f57db98c892db227629 (diff) |
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.c | 11 |
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 8346e3450f83..21fd91bf97b5 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); |