Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: atmel-ssc: prepare clock only when request

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>

authored by

Bo Shen and committed by
Greg Kroah-Hartman
49af54ff d512c209

+2 -2
+2 -2
drivers/misc/atmel-ssc.c
··· 57 57 ssc->user++; 58 58 spin_unlock(&user_lock); 59 59 60 - clk_prepare_enable(ssc->clk); 60 + clk_prepare(ssc->clk); 61 61 62 62 return ssc; 63 63 } ··· 77 77 spin_unlock(&user_lock); 78 78 79 79 if (disable_clk) 80 - clk_disable_unprepare(ssc->clk); 80 + clk_unprepare(ssc->clk); 81 81 } 82 82 EXPORT_SYMBOL(ssc_free); 83 83