提交 bfb1f46f 编写于 作者: G Geert Uytterhoeven 提交者: Wim Van Sebroeck

watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF

While the custom minimal TXx9 clock implementation doesn't need or use
clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE),
they are mandatory when using the Common Clock Framework.

Hence add them, to prepare for the advent of CCF.
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 619db74a
...@@ -112,7 +112,7 @@ static int __init txx9wdt_probe(struct platform_device *dev) ...@@ -112,7 +112,7 @@ static int __init txx9wdt_probe(struct platform_device *dev)
txx9_imclk = NULL; txx9_imclk = NULL;
goto exit; goto exit;
} }
ret = clk_enable(txx9_imclk); ret = clk_prepare_enable(txx9_imclk);
if (ret) { if (ret) {
clk_put(txx9_imclk); clk_put(txx9_imclk);
txx9_imclk = NULL; txx9_imclk = NULL;
...@@ -144,7 +144,7 @@ static int __init txx9wdt_probe(struct platform_device *dev) ...@@ -144,7 +144,7 @@ static int __init txx9wdt_probe(struct platform_device *dev)
return 0; return 0;
exit: exit:
if (txx9_imclk) { if (txx9_imclk) {
clk_disable(txx9_imclk); clk_disable_unprepare(txx9_imclk);
clk_put(txx9_imclk); clk_put(txx9_imclk);
} }
return ret; return ret;
...@@ -153,7 +153,7 @@ static int __init txx9wdt_probe(struct platform_device *dev) ...@@ -153,7 +153,7 @@ static int __init txx9wdt_probe(struct platform_device *dev)
static int __exit txx9wdt_remove(struct platform_device *dev) static int __exit txx9wdt_remove(struct platform_device *dev)
{ {
watchdog_unregister_device(&txx9wdt); watchdog_unregister_device(&txx9wdt);
clk_disable(txx9_imclk); clk_disable_unprepare(txx9_imclk);
clk_put(txx9_imclk); clk_put(txx9_imclk);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册