build fix for amd756 in sensors 2.9
Hi,
lm_sensors 2.9 does not fully compile under linux 2.4 because the i2c-amd756 module exports a symbol and is not referenced in the export-objs in the makefile :
(i2c-amd756.c)
+
+EXPORT_SYMBOL(amd756_smbus);
+
(makefile)
export-objs := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o \
i2c-algo-ite.o i2c-algo-sibyte.o i2c-algo-sgi.o \
i2c-algo-8xx.o i2c-algo-ibm_ocp.o \
i2c-proc.oThe trivial fix below fixes the problem. Please apply.
Thanks,
Willy
(PS: I'm not subscribed, so please CC me when replying)
drivers/i2c/Makefile renamed from drivers/i2c/Makefile.bad +1 -1
@@ -7,7 +7,7 @@ export-objs := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o \ i2c-algo-ite.o i2c-algo-sibyte.o i2c-algo-sgi.o \ i2c-algo-8xx.o i2c-algo-ibm_ocp.o \ - i2c-proc.o + i2c-proc.o i2c-amd756.o obj-$(CONFIG_I2C) += i2c-core.o obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
Salut Jean,
Quoted 8 lines · Jean Delvare
Except that this wouldn't be correct. i2c-amd756 doesn't belong to the main 2.4 kernel tree, it's added there by the sensors patch. So the correct fix was to teach the
lm_sensorspatch maker how to properly add an export declaration for i2c-amd756.If you regenerate the sensors patch from
lm_sensorsCVS and apply it instead of the patch generated fromlm_sensors2.9.0, it should just work.
That's what I did indeed, but did not notice the export-objs += i2c-amd756.o hidden between several obj-* lines ;-)
Thanks, I don't need this patch anymore.
Cheers,
Willy
Salut Willy,
Review
Quoted 8 lines
lm_sensors2.9 does not fully compile under linux 2.4 because the i2c-amd756 module exports a symbol and is not referenced in the export-objs in the makefile :(
i2c-amd756.c)(quoted diff) +3
-0+ +EXPORT_SYMBOL(amd756_smbus); +
The problem was already reported and fixed in lm_sensors CVS on January 10th, 2005 (but thanks for reporting anyway).
drivers/i2c/Makefile line 10
Quoted 10 lines
The trivial fix below fixes the problem. Please apply. (...)
drivers/i2c/Makefile renamed from drivers/i2c/Makefile.bad +1
-1@@ -7,7 +7,7 @@ export-objs := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o \ i2c-algo-ite.o i2c-algo-sibyte.o i2c-algo-sgi.o \ i2c-algo-8xx.o i2c-algo-ibm_ocp.o \ - i2c-proc.o + i2c-proc.o i2c-amd756.o
Except that this wouldn't be correct. i2c-amd756 doesn't belong to the main 2.4 kernel tree, it's added there by the sensors patch. So the correct fix was to teach the lm_sensors patch maker how to properly add an export declaration for i2c-amd756.
If you regenerate the sensors patch from lm_sensors CVS and apply it instead of the patch generated from lm_sensors 2.9.0, it should just work.
Thanks,
Signature · 1 line
Jean Delvare