diff options
author | hongbo.zhang <hongbo.zhang@linaro.com> | 2012-08-07 13:35:32 +0800 |
---|---|---|
committer | hongbo.zhang <hongbo.zhang@linaro.com> | 2012-11-28 17:11:10 +0800 |
commit | ba2cbccb2015cab2cdd707749f4430c847d14f9c (patch) | |
tree | f5833ee4184d87236c645c74a617bc9651dbdbdb /cpufreq/cpufreq_09.sh | |
parent | 137c4f0852a17b99fea056b4bcc2a835a7832527 (diff) |
cpufreq: governor mode should be checked if it is supported before setting it.
Signed-off-by: hongbo.zhang <hongbo.zhang@linaro.com>
Diffstat (limited to 'cpufreq/cpufreq_09.sh')
-rwxr-xr-x | cpufreq/cpufreq_09.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpufreq/cpufreq_09.sh b/cpufreq/cpufreq_09.sh index 1807dc8..fc700c2 100755 --- a/cpufreq/cpufreq_09.sh +++ b/cpufreq/cpufreq_09.sh @@ -67,6 +67,12 @@ if [ $(id -u) != 0 ]; then exit 0 fi +supported=$(cat $CPU_PATH/cpu0/cpufreq/scaling_available_governors | grep "powersave") +if [ -z $supported ]; then + log_skip "powersave not supported" + exit 0 +fi + trap "restore_governors; sigtrap" SIGHUP SIGINT SIGTERM for_each_cpu check_powersave |