diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-03-04 12:08:28 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-03-04 12:08:28 +0000 |
commit | 3205b96039645779db2f588031279c7aad41a545 (patch) | |
tree | f99a6edbfc763faa39b0ce287fa93f5cd4d57608 /target/linux/ar71xx/patches-3.8/039-watchdog-ath79_wdt-convert-to-use-devm_clk_get.patch | |
parent | 9bf369fc7e407f8ee8f3910d7cb2f44f049a7261 (diff) |
ar71xx: add backported watchdog patches
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35879 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/patches-3.8/039-watchdog-ath79_wdt-convert-to-use-devm_clk_get.patch')
-rw-r--r-- | target/linux/ar71xx/patches-3.8/039-watchdog-ath79_wdt-convert-to-use-devm_clk_get.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-3.8/039-watchdog-ath79_wdt-convert-to-use-devm_clk_get.patch b/target/linux/ar71xx/patches-3.8/039-watchdog-ath79_wdt-convert-to-use-devm_clk_get.patch new file mode 100644 index 000000000..e0b8d50dc --- /dev/null +++ b/target/linux/ar71xx/patches-3.8/039-watchdog-ath79_wdt-convert-to-use-devm_clk_get.patch @@ -0,0 +1,51 @@ +From 7ddf72f2337b5f7790994df966c26cd1180e1585 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos <juhosg@openwrt.org> +Date: Thu, 27 Dec 2012 15:38:24 +0100 +Subject: [PATCH] watchdog: ath79_wdt: convert to use devm_clk_get + +commit 5071a88475b758bf60191e53606463fe7290c71e upstream. + +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> +--- + drivers/watchdog/ath79_wdt.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +--- a/drivers/watchdog/ath79_wdt.c ++++ b/drivers/watchdog/ath79_wdt.c +@@ -229,13 +229,13 @@ static int ath79_wdt_probe(struct platfo + 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 platfo + + 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 platf + { + misc_deregister(&ath79_wdt_miscdev); + clk_disable(wdt_clk); +- clk_put(wdt_clk); + return 0; + } + |