diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:44:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:44:08 -0500 |
commit | ad2e62a038c392a3453712fbb42fd71faacc203a (patch) | |
tree | 7dfbe54f308cf9da77232450dd5676fdbe5c9c3c | |
parent | 51e6ed23fc95c3e710d8a98717924ccb2571aa66 (diff) | |
parent | 3453c8478a228d9b374956ea99256163f1a0c88c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Remove unneeded errata workaround from p4-clockmod.
[CPUFREQ] check sysfs_create_link return value
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/p4-clockmod.c | 9 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 17 |
2 files changed, 13 insertions, 13 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c index bec50170b75a..4786fedca6eb 100644 --- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -51,7 +51,6 @@ enum { | |||
51 | 51 | ||
52 | 52 | ||
53 | static int has_N44_O17_errata[NR_CPUS]; | 53 | static int has_N44_O17_errata[NR_CPUS]; |
54 | static int has_N60_errata[NR_CPUS]; | ||
55 | static unsigned int stock_freq; | 54 | static unsigned int stock_freq; |
56 | static struct cpufreq_driver p4clockmod_driver; | 55 | static struct cpufreq_driver p4clockmod_driver; |
57 | static unsigned int cpufreq_p4_get(unsigned int cpu); | 56 | static unsigned int cpufreq_p4_get(unsigned int cpu); |
@@ -224,12 +223,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
224 | case 0x0f12: | 223 | case 0x0f12: |
225 | has_N44_O17_errata[policy->cpu] = 1; | 224 | has_N44_O17_errata[policy->cpu] = 1; |
226 | dprintk("has errata -- disabling low frequencies\n"); | 225 | dprintk("has errata -- disabling low frequencies\n"); |
227 | break; | ||
228 | |||
229 | case 0x0f29: | ||
230 | has_N60_errata[policy->cpu] = 1; | ||
231 | dprintk("has errata -- disabling frequencies lower than 2ghz\n"); | ||
232 | break; | ||
233 | } | 226 | } |
234 | 227 | ||
235 | /* get max frequency */ | 228 | /* get max frequency */ |
@@ -241,8 +234,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | |||
241 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { | 234 | for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) { |
242 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) | 235 | if ((i<2) && (has_N44_O17_errata[policy->cpu])) |
243 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 236 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
244 | else if (has_N60_errata[policy->cpu] && ((stock_freq * i)/8) < 2000000) | ||
245 | p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID; | ||
246 | else | 237 | else |
247 | p4clockmod_table[i].frequency = (stock_freq * i)/8; | 238 | p4clockmod_table[i].frequency = (stock_freq * i)/8; |
248 | } | 239 | } |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index d91330432ba2..a45cc89e387a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -722,8 +722,13 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
722 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); | 722 | spin_unlock_irqrestore(&cpufreq_driver_lock, flags); |
723 | 723 | ||
724 | dprintk("CPU already managed, adding link\n"); | 724 | dprintk("CPU already managed, adding link\n"); |
725 | sysfs_create_link(&sys_dev->kobj, | 725 | ret = sysfs_create_link(&sys_dev->kobj, |
726 | &managed_policy->kobj, "cpufreq"); | 726 | &managed_policy->kobj, |
727 | "cpufreq"); | ||
728 | if (ret) { | ||
729 | mutex_unlock(&policy->lock); | ||
730 | goto err_out_driver_exit; | ||
731 | } | ||
727 | 732 | ||
728 | cpufreq_debug_enable_ratelimit(); | 733 | cpufreq_debug_enable_ratelimit(); |
729 | mutex_unlock(&policy->lock); | 734 | mutex_unlock(&policy->lock); |
@@ -770,8 +775,12 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
770 | dprintk("CPU %u already managed, adding link\n", j); | 775 | dprintk("CPU %u already managed, adding link\n", j); |
771 | cpufreq_cpu_get(cpu); | 776 | cpufreq_cpu_get(cpu); |
772 | cpu_sys_dev = get_cpu_sysdev(j); | 777 | cpu_sys_dev = get_cpu_sysdev(j); |
773 | sysfs_create_link(&cpu_sys_dev->kobj, &policy->kobj, | 778 | ret = sysfs_create_link(&cpu_sys_dev->kobj, &policy->kobj, |
774 | "cpufreq"); | 779 | "cpufreq"); |
780 | if (ret) { | ||
781 | mutex_unlock(&policy->lock); | ||
782 | goto err_out_unregister; | ||
783 | } | ||
775 | } | 784 | } |
776 | 785 | ||
777 | policy->governor = NULL; /* to assure that the starting sequence is | 786 | policy->governor = NULL; /* to assure that the starting sequence is |