aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-06 08:23:39 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-06 08:23:39 -0400
commit68083e05d72d94f347293d8cc0067050ba904bfa (patch)
tree842e71365bd90866be7add181661a4039d891564 /drivers/cpufreq/cpufreq.c
parent7baac8b91f9871ba8cb09af84de4ae1d86d07812 (diff)
parentb7279469d66b55119784b8b9529c99c1955fe747 (diff)
Merge commit 'v2.6.26-rc9' into cpus4096
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 4937f2f97d8c..d8f8b1e0edde 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -412,7 +412,7 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
412 int ret; 412 int ret;
413 413
414 mutex_unlock(&cpufreq_governor_mutex); 414 mutex_unlock(&cpufreq_governor_mutex);
415 ret = request_module(name); 415 ret = request_module("%s", name);
416 mutex_lock(&cpufreq_governor_mutex); 416 mutex_lock(&cpufreq_governor_mutex);
417 417
418 if (ret == 0) 418 if (ret == 0)
@@ -625,7 +625,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy,
625 unsigned int freq = 0; 625 unsigned int freq = 0;
626 unsigned int ret; 626 unsigned int ret;
627 627
628 if (!policy->governor->store_setspeed) 628 if (!policy->governor || !policy->governor->store_setspeed)
629 return -EINVAL; 629 return -EINVAL;
630 630
631 ret = sscanf(buf, "%u", &freq); 631 ret = sscanf(buf, "%u", &freq);
@@ -639,7 +639,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy,
639 639
640static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf) 640static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf)
641{ 641{
642 if (!policy->governor->show_setspeed) 642 if (!policy->governor || !policy->governor->show_setspeed)
643 return sprintf(buf, "<unsupported>\n"); 643 return sprintf(buf, "<unsupported>\n");
644 644
645 return policy->governor->show_setspeed(policy, buf); 645 return policy->governor->show_setspeed(policy, buf);
@@ -928,13 +928,13 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
928 policy->user_policy.policy = policy->policy; 928 policy->user_policy.policy = policy->policy;
929 policy->user_policy.governor = policy->governor; 929 policy->user_policy.governor = policy->governor;
930 930
931 unlock_policy_rwsem_write(cpu);
932
933 if (ret) { 931 if (ret) {
934 dprintk("setting policy failed\n"); 932 dprintk("setting policy failed\n");
935 goto err_out_unregister; 933 goto err_out_unregister;
936 } 934 }
937 935
936 unlock_policy_rwsem_write(cpu);
937
938 kobject_uevent(&policy->kobj, KOBJ_ADD); 938 kobject_uevent(&policy->kobj, KOBJ_ADD);
939 module_put(cpufreq_driver->owner); 939 module_put(cpufreq_driver->owner);
940 dprintk("initialization complete\n"); 940 dprintk("initialization complete\n");