aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/cpufreq/longhaul.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2006-06-21 16:43:50 -0400
committerAuke-jan Kok <ahkok@gitlost.site>2006-06-21 16:43:50 -0400
commit0d204094d15dac2e8a439b993f71eda385b4dccd (patch)
tree647f0ddec94d0fb4aaf74fa55bcad75946030f8a /arch/i386/kernel/cpu/cpufreq/longhaul.c
parenta487a8f7b6947f6445e5a1aa876522916785d5ec (diff)
parent612eff0e3715a6faff5ba1b74873b99e036c59fe (diff)
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'arch/i386/kernel/cpu/cpufreq/longhaul.c')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/longhaul.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index 8ef38544453c..146f607e9c44 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -77,13 +77,17 @@ static char speedbuffer[8];
77 77
78static char *print_speed(int speed) 78static char *print_speed(int speed)
79{ 79{
80 if (speed > 1000) { 80 if (speed < 1000) {
81 if (speed%1000 == 0) 81 snprintf(speedbuffer, sizeof(speedbuffer),"%dMHz", speed);
82 sprintf (speedbuffer, "%dGHz", speed/1000); 82 return speedbuffer;
83 else 83 }
84 sprintf (speedbuffer, "%d.%dGHz", speed/1000, (speed%1000)/100); 84
85 } else 85 if (speed%1000 == 0)
86 sprintf (speedbuffer, "%dMHz", speed); 86 snprintf(speedbuffer, sizeof(speedbuffer),
87 "%dGHz", speed/1000);
88 else
89 snprintf(speedbuffer, sizeof(speedbuffer),
90 "%d.%dGHz", speed/1000, (speed%1000)/100);
87 91
88 return speedbuffer; 92 return speedbuffer;
89} 93}
@@ -675,7 +679,7 @@ static int __init longhaul_init(void)
675 679
676static void __exit longhaul_exit(void) 680static void __exit longhaul_exit(void)
677{ 681{
678 int i=0; 682 int i;
679 683
680 for (i=0; i < numscales; i++) { 684 for (i=0; i < numscales; i++) {
681 if (clock_ratio[i] == maxmult) { 685 if (clock_ratio[i] == maxmult) {