ia64/xen-unstable

changeset 19196:bf9cdbec516a

cpufreq: fix the build
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Feb 11 16:36:59 2009 +0000 (2009-02-11)
parents 999c465f94f9
children 9e3be0660c1e
files xen/drivers/cpufreq/cpufreq.c
line diff
     1.1 --- a/xen/drivers/cpufreq/cpufreq.c	Wed Feb 11 13:07:45 2009 +0000
     1.2 +++ b/xen/drivers/cpufreq/cpufreq.c	Wed Feb 11 16:36:59 2009 +0000
     1.3 @@ -501,13 +501,12 @@ void __init cpufreq_cmdline_parse(char *
     1.4  {
     1.5      static struct cpufreq_governor *__initdata cpufreq_governors[] =
     1.6      {
     1.7 -        #define CPUFREQ_DEFAULT_GOVERNOR_INDEX 0;
     1.8          &cpufreq_gov_userspace,
     1.9          &cpufreq_gov_dbs,
    1.10          &cpufreq_gov_performance,
    1.11          &cpufreq_gov_powersave
    1.12      };
    1.13 -    unsigned int gov_index = CPUFREQ_DEFAULT_GOVERNOR_INDEX;
    1.14 +    unsigned int gov_index = 0;
    1.15  
    1.16      do {
    1.17          char *val, *end = strchr(str, ',');
    1.18 @@ -520,24 +519,23 @@ void __init cpufreq_cmdline_parse(char *
    1.19              *val++ = '\0';
    1.20  
    1.21          if (!cpufreq_opt_governor) {
    1.22 -            if (!val)
    1.23 -                for (i = 0; i < ARRAY_SIZE(cpufreq_governors); ++i)
    1.24 +            if (!val) {
    1.25 +                for (i = 0; i < ARRAY_SIZE(cpufreq_governors); ++i) {
    1.26                      if (!strcmp(str, cpufreq_governors[i]->name)) {
    1.27                          cpufreq_opt_governor = cpufreq_governors[i];
    1.28                          gov_index = i;
    1.29                          str = NULL;
    1.30                          break;
    1.31                      }
    1.32 -            else
    1.33 +                }
    1.34 +            } else {
    1.35                  cpufreq_opt_governor = CPUFREQ_DEFAULT_GOVERNOR;
    1.36 +            }
    1.37          }
    1.38  
    1.39 -        if (str) {
    1.40 -            if (cpufreq_handle_common_option(str, val))
    1.41 -                ;
    1.42 -            else if (cpufreq_governors[gov_index]->handle_option)
    1.43 -                cpufreq_governors[gov_index]->handle_option(str, val);
    1.44 -        }
    1.45 +        if (str && !cpufreq_handle_common_option(str, val) &&
    1.46 +            cpufreq_governors[gov_index]->handle_option)
    1.47 +            cpufreq_governors[gov_index]->handle_option(str, val);
    1.48  
    1.49          str = end;
    1.50      } while (str);