diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-12-27 15:38:24 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-03-01 12:21:24 +0100 |
commit | 5071a88475b758bf60191e53606463fe7290c71e (patch) | |
tree | 2aadc6ed5d1daf3637673516cc6a905513400ee5 /drivers/watchdog/ath79_wdt.c | |
parent | 41adafbd7b84c66c2cdad857b75d5d45032310a6 (diff) | |
download | talos-op-linux-5071a88475b758bf60191e53606463fe7290c71e.tar.gz talos-op-linux-5071a88475b758bf60191e53606463fe7290c71e.zip |
watchdog: ath79_wdt: convert to use devm_clk_get
Use the managed version of clk_get. This allows to
simplify the probe/remove functions a bit.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/ath79_wdt.c')
-rw-r--r-- | drivers/watchdog/ath79_wdt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c index 38a999e60c0d..dcd18ec1821b 100644 --- a/drivers/watchdog/ath79_wdt.c +++ b/drivers/watchdog/ath79_wdt.c @@ -229,13 +229,13 @@ static int ath79_wdt_probe(struct platform_device *pdev) u32 ctrl; int err; - wdt_clk = clk_get(&pdev->dev, "wdt"); + wdt_clk = devm_clk_get(&pdev->dev, "wdt"); if (IS_ERR(wdt_clk)) return PTR_ERR(wdt_clk); err = clk_enable(wdt_clk); if (err) - goto err_clk_put; + return err; wdt_freq = clk_get_rate(wdt_clk); if (!wdt_freq) { @@ -265,8 +265,6 @@ static int ath79_wdt_probe(struct platform_device *pdev) err_clk_disable: clk_disable(wdt_clk); -err_clk_put: - clk_put(wdt_clk); return err; } @@ -274,7 +272,6 @@ static int ath79_wdt_remove(struct platform_device *pdev) { misc_deregister(&ath79_wdt_miscdev); clk_disable(wdt_clk); - clk_put(wdt_clk); return 0; } |