From ceba584514ef2fd8736d997cc87f2f4af09b6104 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Tue, 22 Apr 2014 19:41:07 +0800 Subject: [PATCH] rk: cpufreq: fix lock warning INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0 #21 [] (unwind_backtrace+0x0/0xe0) from [] (show_stack+0x10/0x14) [] (show_stack+0x10/0x14) from [] (__lock_acquire.isra.24+0x1a4/0x77c) [] (__lock_acquire.isra.24+0x1a4/0x77c) from [] (lock_acquire+0x120/0x144) [] (lock_acquire+0x120/0x144) from [] (_raw_spin_lock_irqsave+0x4c/0x60) [] (_raw_spin_lock_irqsave+0x4c/0x60) from [] (store_target_loads+0x34/0x70) [] (store_target_loads+0x34/0x70) from [] (cpufreq_governor_interactive+0x1a4/0x56c) [] (cpufreq_governor_interactive+0x1a4/0x56c) from [] (__cpufreq_governor.part.11+0x18/0x84) [] (__cpufreq_governor.part.11+0x18/0x84) from [] (__cpufreq_set_policy.part.15+0xe8/0x16c) [] (__cpufreq_set_policy.part.15+0xe8/0x16c) from [] (cpufreq_add_dev_interface+0x20c/0x250) [] (cpufreq_add_dev_interface+0x20c/0x250) from [] (cpufreq_add_dev+0x23c/0x33c) [] (cpufreq_add_dev+0x23c/0x33c) from [] (subsys_interface_register+0x80/0xb8) [] (subsys_interface_register+0x80/0xb8) from [] (cpufreq_register_driver+0xa0/0x188) [] (cpufreq_register_driver+0xa0/0x188) from [] (do_one_initcall+0x34/0xc8) [] (do_one_initcall+0x34/0xc8) from [] (do_initcalls+0x70/0xa0) [] (do_initcalls+0x70/0xa0) from [] (kernel_init_freeable+0x8c/0x12c) [] (kernel_init_freeable+0x8c/0x12c) from [] (kernel_init+0x8/0xe4) [] (kernel_init+0x8/0xe4) from [] (ret_from_fork+0x14/0x3c) --- drivers/cpufreq/cpufreq_interactive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index 8362b3dbf54a..e052f0831cad 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -1155,6 +1155,9 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy, tunables->boostpulse_duration_val = DEFAULT_MIN_SAMPLE_TIME; tunables->timer_slack_val = DEFAULT_TIMER_SLACK; + spin_lock_init(&tunables->target_loads_lock); + spin_lock_init(&tunables->above_hispeed_delay_lock); + #ifdef CONFIG_ARCH_ROCKCHIP { unsigned int index; @@ -1172,9 +1175,6 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy, } #endif - spin_lock_init(&tunables->target_loads_lock); - spin_lock_init(&tunables->above_hispeed_delay_lock); - policy->governor_data = tunables; if (!have_governor_per_policy()) common_tunables = tunables; -- 2.34.1