Commit 842c34a2 authored by Liao Chang's avatar Liao Chang Committed by Rafael J. Wysocki

cpufreq: conservative: Simplify the condition of storing 'down_threshold'

The governor currently checks if the input new down_threshold is less
than 100 before storing it, but the up_threshold field of dbs_data
structure is also limited to be less than 100, so this check is
unnecessary and remove it.
Signed-off-by: default avatarLiao Chang <liaochang1@huawei.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 16a03c71
...@@ -187,8 +187,7 @@ static ssize_t down_threshold_store(struct gov_attr_set *attr_set, ...@@ -187,8 +187,7 @@ static ssize_t down_threshold_store(struct gov_attr_set *attr_set,
ret = sscanf(buf, "%u", &input); ret = sscanf(buf, "%u", &input);
/* cannot be lower than 1 otherwise freq will not fall */ /* cannot be lower than 1 otherwise freq will not fall */
if (ret != 1 || input < 1 || input > 100 || if (ret != 1 || input < 1 || input >= dbs_data->up_threshold)
input >= dbs_data->up_threshold)
return -EINVAL; return -EINVAL;
cs_tuners->down_threshold = input; cs_tuners->down_threshold = input;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment