diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 14:09:17 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 23:41:57 +0400 |
commit | 8cbce1e5f00ec68ee1c99f57db98c892db227629 (patch) | |
tree | 34bab927b431a710117e8492b08fe30c16280c7a /drivers/rtc/rtc-snvs.c | |
parent | 6d4294d1634543853febc4287ecf02998fd234e1 (diff) | |
download | linux-8cbce1e5f00ec68ee1c99f57db98c892db227629.tar.xz |
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-snvs.c')
-rw-r--r-- | drivers/rtc/rtc-snvs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c index d5ec7854a651..40662e9dc0ab 100644 --- a/drivers/rtc/rtc-snvs.c +++ b/drivers/rtc/rtc-snvs.c @@ -252,9 +252,9 @@ static int snvs_rtc_probe(struct platform_device *pdev) return -ENOMEM; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->ioaddr = devm_request_and_ioremap(&pdev->dev, res); - if (!data->ioaddr) - return -EADDRNOTAVAIL; + data->ioaddr = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(data->ioaddr)) + return PTR_ERR(data->ioaddr); data->irq = platform_get_irq(pdev, 0); if (data->irq < 0) |