Merge branch 'fixes-25' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes-25' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] fix section mismatch warnings
[CPUFREQ] Remove debugging message from e_powersaver
[CPUFREQ] Fix missing cpufreq_cpu_put() call in ->store
[CPUFREQ] Fix missing cpufreq_cpu_put() call in ->show

+18 -12
+6 -2
arch/x86/kernel/cpu/cpufreq/e_powersaver.c
··· 55 { 56 struct cpufreq_freqs freqs; 57 u32 lo, hi; 58 - u8 current_multiplier, current_voltage; 59 int err = 0; 60 int i; 61 ··· 94 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); 95 freqs.new = centaur->fsb * ((lo >> 8) & 0xff); 96 97 /* Print voltage and multiplier */ 98 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); 99 current_voltage = lo & 0xff; ··· 106 current_multiplier = (lo >> 8) & 0xff; 107 printk(KERN_INFO "eps: Current multiplier = %d\n", 108 current_multiplier); 109 - 110 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 111 return err; 112 }
··· 55 { 56 struct cpufreq_freqs freqs; 57 u32 lo, hi; 58 int err = 0; 59 int i; 60 ··· 95 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); 96 freqs.new = centaur->fsb * ((lo >> 8) & 0xff); 97 98 + #ifdef DEBUG 99 + { 100 + u8 current_multiplier, current_voltage; 101 + 102 /* Print voltage and multiplier */ 103 rdmsr(MSR_IA32_PERF_STATUS, lo, hi); 104 current_voltage = lo & 0xff; ··· 103 current_multiplier = (lo >> 8) & 0xff; 104 printk(KERN_INFO "eps: Current multiplier = %d\n", 105 current_multiplier); 106 + } 107 + #endif 108 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 109 return err; 110 }
+11 -9
drivers/cpufreq/cpufreq.c
··· 671 { 672 struct cpufreq_policy * policy = to_policy(kobj); 673 struct freq_attr * fattr = to_attr(attr); 674 - ssize_t ret; 675 policy = cpufreq_cpu_get(policy->cpu); 676 if (!policy) 677 - return -EINVAL; 678 679 if (lock_policy_rwsem_read(policy->cpu) < 0) 680 - return -EINVAL; 681 682 if (fattr->show) 683 ret = fattr->show(policy, buf); ··· 685 ret = -EIO; 686 687 unlock_policy_rwsem_read(policy->cpu); 688 - 689 cpufreq_cpu_put(policy); 690 return ret; 691 } 692 ··· 696 { 697 struct cpufreq_policy * policy = to_policy(kobj); 698 struct freq_attr * fattr = to_attr(attr); 699 - ssize_t ret; 700 policy = cpufreq_cpu_get(policy->cpu); 701 if (!policy) 702 - return -EINVAL; 703 704 if (lock_policy_rwsem_write(policy->cpu) < 0) 705 - return -EINVAL; 706 707 if (fattr->store) 708 ret = fattr->store(policy, buf, count); ··· 710 ret = -EIO; 711 712 unlock_policy_rwsem_write(policy->cpu); 713 - 714 cpufreq_cpu_put(policy); 715 return ret; 716 } 717 ··· 1777 return NOTIFY_OK; 1778 } 1779 1780 - static struct notifier_block __cpuinitdata cpufreq_cpu_notifier = 1781 { 1782 .notifier_call = cpufreq_cpu_callback, 1783 };
··· 671 { 672 struct cpufreq_policy * policy = to_policy(kobj); 673 struct freq_attr * fattr = to_attr(attr); 674 + ssize_t ret = -EINVAL; 675 policy = cpufreq_cpu_get(policy->cpu); 676 if (!policy) 677 + goto no_policy; 678 679 if (lock_policy_rwsem_read(policy->cpu) < 0) 680 + goto fail; 681 682 if (fattr->show) 683 ret = fattr->show(policy, buf); ··· 685 ret = -EIO; 686 687 unlock_policy_rwsem_read(policy->cpu); 688 + fail: 689 cpufreq_cpu_put(policy); 690 + no_policy: 691 return ret; 692 } 693 ··· 695 { 696 struct cpufreq_policy * policy = to_policy(kobj); 697 struct freq_attr * fattr = to_attr(attr); 698 + ssize_t ret = -EINVAL; 699 policy = cpufreq_cpu_get(policy->cpu); 700 if (!policy) 701 + goto no_policy; 702 703 if (lock_policy_rwsem_write(policy->cpu) < 0) 704 + goto fail; 705 706 if (fattr->store) 707 ret = fattr->store(policy, buf, count); ··· 709 ret = -EIO; 710 711 unlock_policy_rwsem_write(policy->cpu); 712 + fail: 713 cpufreq_cpu_put(policy); 714 + no_policy: 715 return ret; 716 } 717 ··· 1775 return NOTIFY_OK; 1776 } 1777 1778 + static struct notifier_block __refdata cpufreq_cpu_notifier = 1779 { 1780 .notifier_call = cpufreq_cpu_callback, 1781 };
+1 -1
drivers/cpufreq/cpufreq_stats.c
··· 323 return NOTIFY_OK; 324 } 325 326 - static struct notifier_block cpufreq_stat_cpu_notifier __cpuinitdata = 327 { 328 .notifier_call = cpufreq_stat_cpu_callback, 329 };
··· 323 return NOTIFY_OK; 324 } 325 326 + static struct notifier_block cpufreq_stat_cpu_notifier __refdata = 327 { 328 .notifier_call = cpufreq_stat_cpu_callback, 329 };