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