diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-07-14 17:29:34 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-14 17:29:34 -0400 |
commit | 2fceef397f9880b212a74c418290ce69e7ac00eb (patch) | |
tree | d9cc09ab992825ef7fede4a688103503e3caf655 /drivers/cpufreq/cpufreq.c | |
parent | feae1ef116ed381625d3731c5ae4f4ebcb3fa302 (diff) | |
parent | bce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff) |
Merge commit 'v2.6.26' into bkl-removal
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 7fce038fa57e..1d41496ed2f8 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 | ||
640 | static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf) | 640 | static 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"); |