diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:57 -0500 |
commit | 8cbce1e5f00ec68ee1c99f57db98c892db227629 (patch) | |
tree | 34bab927b431a710117e8492b08fe30c16280c7a /drivers/rtc/rtc-tegra.c | |
parent | 6d4294d1634543853febc4287ecf02998fd234e1 (diff) |
rtc: 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>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rtc/rtc-tegra.c')
-rw-r--r-- | drivers/rtc/rtc-tegra.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c index c84ea6659f49..7c033756d6b5 100644 --- a/drivers/rtc/rtc-tegra.c +++ b/drivers/rtc/rtc-tegra.c | |||
@@ -327,11 +327,9 @@ static int tegra_rtc_probe(struct platform_device *pdev) | |||
327 | return -EBUSY; | 327 | return -EBUSY; |
328 | } | 328 | } |
329 | 329 | ||
330 | info->rtc_base = devm_request_and_ioremap(&pdev->dev, res); | 330 | info->rtc_base = devm_ioremap_resource(&pdev->dev, res); |
331 | if (!info->rtc_base) { | 331 | if (IS_ERR(info->rtc_base)) |
332 | dev_err(&pdev->dev, "Unable to request mem region and grab IOs for device.\n"); | 332 | return PTR_ERR(info->rtc_base); |
333 | return -EBUSY; | ||
334 | } | ||
335 | 333 | ||
336 | info->tegra_rtc_irq = platform_get_irq(pdev, 0); | 334 | info->tegra_rtc_irq = platform_get_irq(pdev, 0); |
337 | if (info->tegra_rtc_irq <= 0) | 335 | if (info->tegra_rtc_irq <= 0) |