hostapd: remove old button hotplug script
[openwrt.git] / target / linux / ar71xx / patches-3.8 / 039-watchdog-ath79_wdt-convert-to-use-devm_clk_get.patch
1 From 7ddf72f2337b5f7790994df966c26cd1180e1585 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Thu, 27 Dec 2012 15:38:24 +0100
4 Subject: [PATCH] watchdog: ath79_wdt: convert to use devm_clk_get
5
6 commit 5071a88475b758bf60191e53606463fe7290c71e upstream.
7
8 Use the managed version of clk_get. This allows to
9 simplify the probe/remove functions a bit.
10
11 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
12 Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
13 ---
14  drivers/watchdog/ath79_wdt.c |    7 ++-----
15  1 file changed, 2 insertions(+), 5 deletions(-)
16
17 --- a/drivers/watchdog/ath79_wdt.c
18 +++ b/drivers/watchdog/ath79_wdt.c
19 @@ -229,13 +229,13 @@ static int ath79_wdt_probe(struct platfo
20         u32 ctrl;
21         int err;
22  
23 -       wdt_clk = clk_get(&pdev->dev, "wdt");
24 +       wdt_clk = devm_clk_get(&pdev->dev, "wdt");
25         if (IS_ERR(wdt_clk))
26                 return PTR_ERR(wdt_clk);
27  
28         err = clk_enable(wdt_clk);
29         if (err)
30 -               goto err_clk_put;
31 +               return err;
32  
33         wdt_freq = clk_get_rate(wdt_clk);
34         if (!wdt_freq) {
35 @@ -265,8 +265,6 @@ static int ath79_wdt_probe(struct platfo
36  
37  err_clk_disable:
38         clk_disable(wdt_clk);
39 -err_clk_put:
40 -       clk_put(wdt_clk);
41         return err;
42  }
43  
44 @@ -274,7 +272,6 @@ static int ath79_wdt_remove(struct platf
45  {
46         misc_deregister(&ath79_wdt_miscdev);
47         clk_disable(wdt_clk);
48 -       clk_put(wdt_clk);
49         return 0;
50  }
51