diff options
author | Mattia Dongili <malattia@linux.it> | 2006-05-25 23:22:36 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-05-29 17:04:45 +0200 |
commit | 46547d3f409e2c43b79c0dc5bb61997c350dbe1f (patch) | |
tree | a21e057b067e48ccc0eb495e0a149de705a9c26a | |
parent | f7c6789238ed300ea8ffe24b9b863daff80dfb34 (diff) | |
download | cpufrequtils-46547d3f409e2c43b79c0dc5bb61997c350dbe1f.tar.gz |
[PATCH] set max before min frequency
The kernel refuses[1] to set a min_freq higher than the
max_freq, therefore we should set MAX before MIN frequency.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r-- | lib/sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sysfs.c b/lib/sysfs.c index cf42844..5d256b5 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -508,11 +508,11 @@ int sysfs_set_policy(unsigned int cpu, struct cpufreq_policy *policy) snprintf(min, SYSFS_PATH_MAX, "%lu", policy->min); snprintf(max, SYSFS_PATH_MAX, "%lu", policy->max); - ret = sysfs_write_one_value(cpu, WRITE_SCALING_MIN_FREQ, min, strlen(min)); + ret = sysfs_write_one_value(cpu, WRITE_SCALING_MAX_FREQ, max, strlen(max)); if (ret) return ret; - ret = sysfs_write_one_value(cpu, WRITE_SCALING_MAX_FREQ, max, strlen(max)); + ret = sysfs_write_one_value(cpu, WRITE_SCALING_MIN_FREQ, min, strlen(min)); if (ret) return ret; |