[PATCH] clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().

Turquette, Mike mturquette at ti.com
Wed May 16 01:40:11 EDT 2012


On Tue, May 15, 2012 at 5:25 PM, Richard Zhao
<richard.zhao at freescale.com> wrote:
> On Tue, May 15, 2012 at 01:43:42PM -0700, Saravana Kannan wrote:
>> The clk_set_rate() code shouldn't check the clock's enable count when
>> validating CLK_SET_RATE_GATE flag since the enable count could change after
>> the validation. Similar to clk_set_parent(), it should instead check the
>> prepare count. The prepare count should go to zero only when the end user
>> expects the clock to not be enabled in the future. Since the code already
>> grabs the prepare count before validation, it's not possible for prepare
>> count to change after validation and by association not possible for a well
>> behaving end user to enable the clock while the set rate is in progress.
>>
>> Signed-off-by: Saravana Kannan <skannan at codeaurora.org>
> Reviewed-by: Richard Zhao <richard.zhao at freescale.com>

Looks good to me.  I'll take into clk-next for one final pull request
to arm-soc.

Thanks,
Mike



More information about the linux-arm-kernel mailing list