cpufreq: Fix a cpufreq cmdline parse bug, and change sample_rate unit
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 29 Dec 2008 13:37:46 +0000 (13:37 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 29 Dec 2008 13:37:46 +0000 (13:37 +0000)
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
xen/drivers/cpufreq/cpufreq_ondemand.c

index f5017beda63b5c61343b9823fad8dae83ed8f359..55c005932daf1ec9e3421f36ba202877f3e10fc5 100644 (file)
@@ -307,11 +307,11 @@ void __init cpufreq_cmdline_parse(char *str)
             *end++ = '\0';
         val = strchr(str, '=');
         if ( val )
-            *val = '\0';
+            *val++ = '\0';
 
         if ( !strcmp(str, "rate") && val )
         {
-            usr_sampling_rate = simple_strtoull(val, NULL, 0);
+            usr_sampling_rate = simple_strtoull(val, NULL, 0) * MICROSECS(1);
         }
         else if ( !strcmp(str, "threshold") && val )
         {