diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-02-11 16:36:59 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-02-11 16:36:59 +0000 |
commit | f80bfa336f1f53323efc7e7962d7db185fcf5e10 (patch) | |
tree | 4c37abf01d9782459ac6756fc9892801d35d4186 /xen/drivers/cpufreq | |
parent | 146902cadaca60127286c990ed8504e27d895b74 (diff) | |
download | xen-f80bfa336f1f53323efc7e7962d7db185fcf5e10.tar.gz xen-f80bfa336f1f53323efc7e7962d7db185fcf5e10.tar.bz2 xen-f80bfa336f1f53323efc7e7962d7db185fcf5e10.zip |
cpufreq: fix the build
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/drivers/cpufreq')
-rw-r--r-- | xen/drivers/cpufreq/cpufreq.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c index 4744c070ff..efb805b01c 100644 --- a/xen/drivers/cpufreq/cpufreq.c +++ b/xen/drivers/cpufreq/cpufreq.c @@ -501,13 +501,12 @@ void __init cpufreq_cmdline_parse(char *str) { static struct cpufreq_governor *__initdata cpufreq_governors[] = { - #define CPUFREQ_DEFAULT_GOVERNOR_INDEX 0; &cpufreq_gov_userspace, &cpufreq_gov_dbs, &cpufreq_gov_performance, &cpufreq_gov_powersave }; - unsigned int gov_index = CPUFREQ_DEFAULT_GOVERNOR_INDEX; + unsigned int gov_index = 0; do { char *val, *end = strchr(str, ','); @@ -520,24 +519,23 @@ void __init cpufreq_cmdline_parse(char *str) *val++ = '\0'; if (!cpufreq_opt_governor) { - if (!val) - for (i = 0; i < ARRAY_SIZE(cpufreq_governors); ++i) + if (!val) { + for (i = 0; i < ARRAY_SIZE(cpufreq_governors); ++i) { if (!strcmp(str, cpufreq_governors[i]->name)) { cpufreq_opt_governor = cpufreq_governors[i]; gov_index = i; str = NULL; break; } - else + } + } else { cpufreq_opt_governor = CPUFREQ_DEFAULT_GOVERNOR; + } } - if (str) { - if (cpufreq_handle_common_option(str, val)) - ; - else if (cpufreq_governors[gov_index]->handle_option) - cpufreq_governors[gov_index]->handle_option(str, val); - } + if (str && !cpufreq_handle_common_option(str, val) && + cpufreq_governors[gov_index]->handle_option) + cpufreq_governors[gov_index]->handle_option(str, val); str = end; } while (str); |