aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/imx2_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/imx2_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/imx2_wdt.c')
-rw-r--r--drivers/watchdog/imx2_wdt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index bc17decc8551..ff908823688c 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -262,11 +262,9 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
262 return -ENODEV; 262 return -ENODEV;
263 } 263 }
264 264
265 imx2_wdt.base = devm_request_and_ioremap(&pdev->dev, res); 265 imx2_wdt.base = devm_ioremap_resource(&pdev->dev, res);
266 if (!imx2_wdt.base) { 266 if (IS_ERR(imx2_wdt.base))
267 dev_err(&pdev->dev, "ioremap failed\n"); 267 return PTR_ERR(imx2_wdt.base);
268 return -ENOMEM;
269 }
270 268
271 imx2_wdt.clk = clk_get(&pdev->dev, NULL); 269 imx2_wdt.clk = clk_get(&pdev->dev, NULL);
272 if (IS_ERR(imx2_wdt.clk)) { 270 if (IS_ERR(imx2_wdt.clk)) {