aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/imx2_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/imx2_wdt.c')
-rw-r--r--drivers/watchdog/imx2_wdt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 62946c2cb4f8..693ac3f4de5a 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -261,7 +261,7 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
261 if (IS_ERR(imx2_wdt.base)) 261 if (IS_ERR(imx2_wdt.base))
262 return PTR_ERR(imx2_wdt.base); 262 return PTR_ERR(imx2_wdt.base);
263 263
264 imx2_wdt.clk = clk_get(&pdev->dev, NULL); 264 imx2_wdt.clk = devm_clk_get(&pdev->dev, NULL);
265 if (IS_ERR(imx2_wdt.clk)) { 265 if (IS_ERR(imx2_wdt.clk)) {
266 dev_err(&pdev->dev, "can't get Watchdog clock\n"); 266 dev_err(&pdev->dev, "can't get Watchdog clock\n");
267 return PTR_ERR(imx2_wdt.clk); 267 return PTR_ERR(imx2_wdt.clk);
@@ -286,7 +286,6 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
286 286
287fail: 287fail:
288 imx2_wdt_miscdev.parent = NULL; 288 imx2_wdt_miscdev.parent = NULL;
289 clk_put(imx2_wdt.clk);
290 return ret; 289 return ret;
291} 290}
292 291
@@ -299,8 +298,7 @@ static int __exit imx2_wdt_remove(struct platform_device *pdev)
299 298
300 dev_crit(imx2_wdt_miscdev.parent, 299 dev_crit(imx2_wdt_miscdev.parent,
301 "Device removed: Expect reboot!\n"); 300 "Device removed: Expect reboot!\n");
302 } else 301 }
303 clk_put(imx2_wdt.clk);
304 302
305 imx2_wdt_miscdev.parent = NULL; 303 imx2_wdt_miscdev.parent = NULL;
306 return 0; 304 return 0;