linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / powerpc / platforms / powermac / cpufreq_64.c
index b57e465..a415e8d 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/cpufreq.h>
 #include <linux/init.h>
 #include <linux/completion.h>
-#include <linux/mutex.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/irq.h>
@@ -91,7 +90,7 @@ static void (*g5_switch_volt)(int speed_mode);
 static int (*g5_switch_freq)(int speed_mode);
 static int (*g5_query_freq)(void);
 
-static DEFINE_MUTEX(g5_switch_mutex);
+static DECLARE_MUTEX(g5_switch_mutex);
 
 
 static struct smu_sdbp_fvt *g5_fvt_table;      /* table of op. points */
@@ -328,7 +327,7 @@ static int g5_cpufreq_target(struct cpufreq_policy *policy,
        if (g5_pmode_cur == newstate)
                return 0;
 
-       mutex_lock(&g5_switch_mutex);
+       down(&g5_switch_mutex);
 
        freqs.old = g5_cpu_freqs[g5_pmode_cur].frequency;
        freqs.new = g5_cpu_freqs[newstate].frequency;
@@ -338,7 +337,7 @@ static int g5_cpufreq_target(struct cpufreq_policy *policy,
        rc = g5_switch_freq(newstate);
        cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 
-       mutex_unlock(&g5_switch_mutex);
+       up(&g5_switch_mutex);
 
        return rc;
 }