WATCHDOG: txx9wdt: Add missing clock (un)prepare calls for CCF
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 11 Sep 2016 08:59:57 +0000 (10:59 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 4 Oct 2016 14:13:57 +0000 (16:13 +0200)
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: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-clk@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-watchdog@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14238/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/watchdog/txx9wdt.c

index c2da880292bc2f326b71678634de5d2968bd38c8..6f7a9deb27d05d25d9a261d9c69460c2dccb9528 100644 (file)
@@ -112,7 +112,7 @@ static int __init txx9wdt_probe(struct platform_device *dev)
                txx9_imclk = NULL;
                goto exit;
        }
-       ret = clk_enable(txx9_imclk);
+       ret = clk_prepare_enable(txx9_imclk);
        if (ret) {
                clk_put(txx9_imclk);
                txx9_imclk = NULL;
@@ -144,7 +144,7 @@ static int __init txx9wdt_probe(struct platform_device *dev)
        return 0;
 exit:
        if (txx9_imclk) {
-               clk_disable(txx9_imclk);
+               clk_disable_unprepare(txx9_imclk);
                clk_put(txx9_imclk);
        }
        return ret;
@@ -153,7 +153,7 @@ exit:
 static int __exit txx9wdt_remove(struct platform_device *dev)
 {
        watchdog_unregister_device(&txx9wdt);
-       clk_disable(txx9_imclk);
+       clk_disable_unprepare(txx9_imclk);
        clk_put(txx9_imclk);
        return 0;
 }