summaryrefslogtreecommitdiff
path: root/firmware/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/system.c')
-rw-r--r--firmware/system.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/system.c b/firmware/system.c
index 1cafc8f096..03414924ca 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -29,13 +29,13 @@ long cpu_frequency = CPU_FREQ;
29#endif 29#endif
30 30
31#ifdef HAVE_ADJUSTABLE_CPU_FREQ 31#ifdef HAVE_ADJUSTABLE_CPU_FREQ
32int boost_counter = 0;
32void cpu_boost(bool on_off) 33void cpu_boost(bool on_off)
33{ 34{
34 static int counter = 0;
35 if(on_off) 35 if(on_off)
36 { 36 {
37 /* Boost the frequency if not already boosted */ 37 /* Boost the frequency if not already boosted */
38 if(counter++ == 0) 38 if(boost_counter++ == 0)
39 { 39 {
40 set_cpu_frequency(CPUFREQ_MAX); 40 set_cpu_frequency(CPUFREQ_MAX);
41 } 41 }
@@ -43,14 +43,14 @@ void cpu_boost(bool on_off)
43 else 43 else
44 { 44 {
45 /* Lower the frequency if the counter reaches 0 */ 45 /* Lower the frequency if the counter reaches 0 */
46 if(--counter == 0) 46 if(--boost_counter == 0)
47 { 47 {
48 set_cpu_frequency(CPUFREQ_NORMAL); 48 set_cpu_frequency(CPUFREQ_NORMAL);
49 } 49 }
50 50
51 /* Safety measure */ 51 /* Safety measure */
52 if(counter < 0) 52 if(boost_counter < 0)
53 counter = 0; 53 boost_counter = 0;
54 } 54 }
55} 55}
56#endif 56#endif