diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 15:21:48 -0500 |
commit | 4c271bb67c04253c1e99006eb48fb773a8fe8c0f (patch) | |
tree | 5a05de9c0bd07e0ddc29e9312fec52c3c741d041 /drivers/watchdog/ar7_wdt.c | |
parent | ca36b1ba8c92cbab6f6568283071262592603d59 (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/ar7_wdt.c')
-rw-r--r-- | drivers/watchdog/ar7_wdt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index 3003e2a9580b..2f3cc8fb471a 100644 --- a/drivers/watchdog/ar7_wdt.c +++ b/drivers/watchdog/ar7_wdt.c | |||
@@ -285,11 +285,9 @@ static int ar7_wdt_probe(struct platform_device *pdev) | |||
285 | return -ENODEV; | 285 | return -ENODEV; |
286 | } | 286 | } |
287 | 287 | ||
288 | ar7_wdt = devm_request_and_ioremap(&pdev->dev, ar7_regs_wdt); | 288 | ar7_wdt = devm_ioremap_resource(&pdev->dev, ar7_regs_wdt); |
289 | if (!ar7_wdt) { | 289 | if (IS_ERR(ar7_wdt)) |
290 | pr_err("could not ioremap registers\n"); | 290 | return PTR_ERR(ar7_wdt); |
291 | return -ENXIO; | ||
292 | } | ||
293 | 291 | ||
294 | vbus_clk = clk_get(NULL, "vbus"); | 292 | vbus_clk = clk_get(NULL, "vbus"); |
295 | if (IS_ERR(vbus_clk)) { | 293 | if (IS_ERR(vbus_clk)) { |