From: Russell King Date: Tue, 24 Feb 2009 12:46:31 +0000 (+0000) Subject: [ARM] omap: clk_set_parent: deny changing parent if clock is enabled X-Git-Tag: v2.6.30-rc1~636^2~20^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4da3782151300237db3abe070f716922889252e0;p=pandora-kernel.git [ARM] omap: clk_set_parent: deny changing parent if clock is enabled Richard Woodruff writes: | The historic usage of this has been against single use leaf clocks | (1st instance of gptimer). When it was used it did: | clk_get() | clk_set_parent() | clk_enable() | | This usage was ok for that. Use on a disabled clock is needed. | | If there are multiple users on the clock or it is enabled there are | problems. | | The call can still be unfriendly if 2 different drivers are using the | clock with their own clock get/enable. It might be the function should | return an error if usecount != 0 to stop surprises. It is all around | better if the parenting is done when the clock is off. This is a good reason to ensure that the clock is not enabled when clk_set_parent() is called. Acked-by: Richard Woodruff Signed-off-by: Russell King --- Reading git-diff-tree failed