aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/jz4740_wdt.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:25 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 15:21:48 -0500
commit4c271bb67c04253c1e99006eb48fb773a8fe8c0f (patch)
tree5a05de9c0bd07e0ddc29e9312fec52c3c741d041 /drivers/watchdog/jz4740_wdt.c
parentca36b1ba8c92cbab6f6568283071262592603d59 (diff)
watchdog: 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> Cc: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog/jz4740_wdt.c')
-rw-r--r--drivers/watchdog/jz4740_wdt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c
index a61408fa0c94..1cb25f69a96d 100644
--- a/drivers/watchdog/jz4740_wdt.c
+++ b/drivers/watchdog/jz4740_wdt.c
@@ -171,9 +171,9 @@ static int jz4740_wdt_probe(struct platform_device *pdev)
171 watchdog_set_drvdata(jz4740_wdt, drvdata); 171 watchdog_set_drvdata(jz4740_wdt, drvdata);
172 172
173 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 173 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
174 drvdata->base = devm_request_and_ioremap(&pdev->dev, res); 174 drvdata->base = devm_ioremap_resource(&pdev->dev, res);
175 if (drvdata->base == NULL) { 175 if (IS_ERR(drvdata->base)) {
176 ret = -EBUSY; 176 ret = PTR_ERR(drvdata->base);
177 goto err_out; 177 goto err_out;
178 } 178 }
179 179