[WOLK-devel] 4.2s - compile errors in speedstep.c
Brought to you by:
hight0wer
|
From: Olaf U. <ola...@at...> - 2003-06-08 01:15:55
|
Hi all,
the changes in speedstep.c seem to have broken the compilation as a
module:
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-wolk4.2s-fullkernel/include -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-unused -finline-limit=2000 -O2 -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=pentium4 -mmmx -msse -msse2 -falign-functions=4 -fprefetch-loop-arrays -maccumulate-outgoing-args -DMODULE -nostdinc -iwithprefix include -DKBUILD_BASENAME=speedstep -c -o speedstep.o speedstep.c
speedstep.c: In function `speedstep_set_state':
speedstep.c:223: warning: comparison between signed and unsigned
speedstep.c: At top level:
speedstep.c:705: error: `speedstep_set_default' undeclared here (not in a function)
speedstep.c:705: error: `speedstep_set_default' undeclared here (not in a function)
speedstep.c:705: error: initializer element is not constant
speedstep.c:705: error: (near initialization for `speedstep_driver.policy')
make[1]: *** [speedstep.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.20-wolk4.2s-fullkernel/arch/i386/kernel'
make: *** [_mod_arch/i386/kernel] Error 2
I made the following changes - compiles fine, but I am not 100% shure, it
still does what the author wanted:
laptop02-uk:/usr/src/linux # diff -u ../test/linux-2.4.20-wolk4.2s-fullkernel/arch/i386/kernel/speedstep.c arch/i386/kernel/speedstep.c
--- ../test/linux-2.4.20-wolk4.2s-fullkernel/arch/i386/kernel/speedstep.c 2003-06-06 14:35:19.000000000 +0200
+++ arch/i386/kernel/speedstep.c 2003-06-06 17:29:17.000000000 +0200
@@ -694,7 +694,6 @@
__setup("speedstep_coppermine=", speedstep_setup);
__setup("speedstep_default=", speedstep_set_default);
-#endif
static struct cpufreq_driver speedstep_driver = {
@@ -706,6 +705,20 @@
.name = "speedstep",
};
+# else
+
+static struct cpufreq_driver speedstep_driver = {
+ .verify = speedstep_verify,
+ .target = speedstep_target,
+ .init = speedstep_cpu_init,
+ .exit = NULL,
+ .policy = NULL,
+ .name = "speedstep",
+};
+
+#endif
+
+
/**
* speedstep_init - initializes the SpeedStep CPUFreq driver
*
At least the autospeedstep daemon is still able to change the speedstep
settings ;-)
--
Mit freundlichen Gruessen / With kind regards,
Olaf Unterkofler |