diff options
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 3162010900c9..fcb86dd8903d 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -768,6 +768,9 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
768 | unlock_policy_rwsem_write(cpu); | 768 | unlock_policy_rwsem_write(cpu); |
769 | goto err_out; | 769 | goto err_out; |
770 | } | 770 | } |
771 | policy->user_policy.min = policy->cpuinfo.min_freq; | ||
772 | policy->user_policy.max = policy->cpuinfo.max_freq; | ||
773 | policy->user_policy.governor = policy->governor; | ||
771 | 774 | ||
772 | #ifdef CONFIG_SMP | 775 | #ifdef CONFIG_SMP |
773 | for_each_cpu_mask(j, policy->cpus) { | 776 | for_each_cpu_mask(j, policy->cpus) { |
@@ -858,10 +861,13 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
858 | 861 | ||
859 | policy->governor = NULL; /* to assure that the starting sequence is | 862 | policy->governor = NULL; /* to assure that the starting sequence is |
860 | * run in cpufreq_set_policy */ | 863 | * run in cpufreq_set_policy */ |
861 | unlock_policy_rwsem_write(cpu); | ||
862 | 864 | ||
863 | /* set default policy */ | 865 | /* set default policy */ |
864 | ret = cpufreq_set_policy(&new_policy); | 866 | ret = __cpufreq_set_policy(policy, &new_policy); |
867 | policy->user_policy.policy = policy->policy; | ||
868 | |||
869 | unlock_policy_rwsem_write(cpu); | ||
870 | |||
865 | if (ret) { | 871 | if (ret) { |
866 | dprintk("setting policy failed\n"); | 872 | dprintk("setting policy failed\n"); |
867 | goto err_out_unregister; | 873 | goto err_out_unregister; |