misc: atmel-ssc: prepare clock only when request
authorBo Shen <voice.shen@atmel.com>
Wed, 24 Sep 2014 09:33:55 +0000 (17:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:52:42 +0000 (09:52 -0800)
Prepare SSC clock only when request SSC channel, the clock will be
enabled when initialize the SSC.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/atmel-ssc.c

index 60843a275abd2072e6a6a95a10cd1a739d5d5695..f9807a76bbc7590c909ee3e703f9fb39193b253a 100644 (file)
@@ -57,7 +57,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
        ssc->user++;
        spin_unlock(&user_lock);
 
-       clk_prepare_enable(ssc->clk);
+       clk_prepare(ssc->clk);
 
        return ssc;
 }
@@ -77,7 +77,7 @@ void ssc_free(struct ssc_device *ssc)
        spin_unlock(&user_lock);
 
        if (disable_clk)
-               clk_disable_unprepare(ssc->clk);
+               clk_unprepare(ssc->clk);
 }
 EXPORT_SYMBOL(ssc_free);