[PATCH] cpufreq: Make cpufreq_get always defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Even if not using cpufreq, there is little justification for exporting
cpufreq_quick_get and not cpufreq_get, especially when it is so easy
and harmless to do.
    
Signed-off-by: Zachary Amsden <zamsden@xxxxxxxxxx>

diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 44717eb..684fc4b 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -291,17 +291,22 @@ struct global_attr {
 int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
 int cpufreq_update_policy(unsigned int cpu);
 
-/* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */
-unsigned int cpufreq_get(unsigned int cpu);
-
-/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */
 #ifdef CONFIG_CPU_FREQ
+/* query the last known CPU freq (in kHz). If zero, cpufreq doesn't know it */
 unsigned int cpufreq_quick_get(unsigned int cpu);
+
+/* query the current CPU frequency (in kHz). If zero, cpufreq doesn't know it */
+unsigned int cpufreq_get(unsigned int cpu);
 #else
 static inline unsigned int cpufreq_quick_get(unsigned int cpu)
 {
 	return 0;
 }
+
+static inline unsigned int cpufreq_get(unsigned int cpu)
+{
+	return 0;
+}
 #endif
 
 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux