|
@@ -27,7 +27,6 @@ static int devfreq_simple_ondemand_func(struct devfreq *df,
|
|
|
unsigned int dfso_upthreshold = DFSO_UPTHRESHOLD;
|
|
|
unsigned int dfso_downdifferential = DFSO_DOWNDIFFERENCTIAL;
|
|
|
struct devfreq_simple_ondemand_data *data = df->data;
|
|
|
- unsigned long max = (df->max_freq) ? df->max_freq : UINT_MAX;
|
|
|
|
|
|
err = devfreq_update_stats(df);
|
|
|
if (err)
|
|
@@ -47,7 +46,7 @@ static int devfreq_simple_ondemand_func(struct devfreq *df,
|
|
|
|
|
|
/* Assume MAX if it is going to be divided by zero */
|
|
|
if (stat->total_time == 0) {
|
|
|
- *freq = max;
|
|
|
+ *freq = DEVFREQ_MAX_FREQ;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -60,13 +59,13 @@ static int devfreq_simple_ondemand_func(struct devfreq *df,
|
|
|
/* Set MAX if it's busy enough */
|
|
|
if (stat->busy_time * 100 >
|
|
|
stat->total_time * dfso_upthreshold) {
|
|
|
- *freq = max;
|
|
|
+ *freq = DEVFREQ_MAX_FREQ;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
/* Set MAX if we do not know the initial frequency */
|
|
|
if (stat->current_frequency == 0) {
|
|
|
- *freq = max;
|
|
|
+ *freq = DEVFREQ_MAX_FREQ;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -85,11 +84,6 @@ static int devfreq_simple_ondemand_func(struct devfreq *df,
|
|
|
b = div_u64(b, (dfso_upthreshold - dfso_downdifferential / 2));
|
|
|
*freq = (unsigned long) b;
|
|
|
|
|
|
- if (df->min_freq && *freq < df->min_freq)
|
|
|
- *freq = df->min_freq;
|
|
|
- if (df->max_freq && *freq > df->max_freq)
|
|
|
- *freq = df->max_freq;
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|