diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 18:16:14 +0900 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-07-11 21:01:53 +0200 |
commit | 259181feb003e3244d4ba15256735ca259be217a (patch) | |
tree | 5ecb6c9eac237050d85881fb6b78909dcbd4934c /drivers/watchdog | |
parent | bdf495742716211259dba644e0950129db6f2641 (diff) | |
download | op-kernel-dev-259181feb003e3244d4ba15256735ca259be217a.zip op-kernel-dev-259181feb003e3244d4ba15256735ca259be217a.tar.gz |
watchdog: pnx4008_wdt: use devm_clk_get()
Use devm_clk_get() to make cleanup paths more simple.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/pnx4008_wdt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c index a3684a3..b30bd43 100644 --- a/drivers/watchdog/pnx4008_wdt.c +++ b/drivers/watchdog/pnx4008_wdt.c @@ -159,13 +159,13 @@ static int pnx4008_wdt_probe(struct platform_device *pdev) if (IS_ERR(wdt_base)) return PTR_ERR(wdt_base); - wdt_clk = clk_get(&pdev->dev, NULL); + wdt_clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(wdt_clk)) return PTR_ERR(wdt_clk); ret = clk_enable(wdt_clk); if (ret) - goto out; + return ret; pnx4008_wdd.bootstatus = (readl(WDTIM_RES(wdt_base)) & WDOG_RESET) ? WDIOF_CARDRESET : 0; @@ -186,8 +186,6 @@ static int pnx4008_wdt_probe(struct platform_device *pdev) disable_clk: clk_disable(wdt_clk); -out: - clk_put(wdt_clk); return ret; } @@ -196,7 +194,6 @@ static int pnx4008_wdt_remove(struct platform_device *pdev) watchdog_unregister_device(&pnx4008_wdd); clk_disable(wdt_clk); - clk_put(wdt_clk); return 0; } |