]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/cpufreq.h
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/scjody/ieee1394
[linux-2.6-omap-h63xx.git] / include / linux / cpufreq.h
index d068176b7ad7f4d7242e2417f87e3f67043b1d23..17866d7e2b71ad08e12fc9340d5b77448032da48 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef _LINUX_CPUFREQ_H
 #define _LINUX_CPUFREQ_H
 
+#include <linux/mutex.h>
 #include <linux/config.h>
 #include <linux/notifier.h>
 #include <linux/threads.h>
@@ -82,7 +83,7 @@ struct cpufreq_policy {
         unsigned int           policy; /* see above */
        struct cpufreq_governor *governor; /* see below */
 
-       struct semaphore        lock;   /* CPU ->setpolicy or ->target may
+       struct mutex            lock;   /* CPU ->setpolicy or ->target may
                                           only be called once a time */
 
        struct work_struct      update; /* if update_policy() needs to be
@@ -256,6 +257,16 @@ 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
+unsigned int cpufreq_quick_get(unsigned int cpu);
+#else
+static inline unsigned int cpufreq_quick_get(unsigned int cpu)
+{
+       return 0;
+}
+#endif
+
 
 /*********************************************************************
  *                       CPUFREQ DEFAULT GOVERNOR                    *