Skip to contentSkip to conversation

i2c 2.9.1 compile fix

PATCH New Thomas Jarosch 2 participants 3 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c 2.9.1 compile fix

Hi,

attached is a patch to fix i2c-algo-bit.c compilation. It was lacking the KERNEL_VERSION macro.

Please CC: comments.

Cheers,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.4.30-i2c-2.9.1-fix.patch
Type: text/x-diff
Size: 449 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050429/90bfa117/linux-2.4.30-i2c-2.9.1-fix.bin

#1 lore raw

PATCH 1/1 i2c 2.9.1 compile fix

Hi Thomas,

Quoted 4 lines

attached is a patch to fix i2c-algo-bit.c compilation. It was lacking the KERNEL_VERSION macro.

Please CC: comments.

Great catch. For some reason it wasn't blocking the compilation for me, nor anyone else I guess, or we would have heard of it before - but that was still bad.

I opted for a different fix, dropping the conditional altogether. This branch of i2c is meant for Linux 2.4 only, so there's no point in keeping Linux 2.5+ compatibility code in there.

Thanks the report.

Signature · 1 line
Jean Delvare
#2 lore raw

PATCH 1/1 i2c 2.9.1 compile fix

In reply to Thomas Jarosch
Quoted 8 lines
Quoted 4 lines

attached is a patch to fix i2c-algo-bit.c compilation. It was lacking the KERNEL_VERSION macro.

Please CC: comments.

Great catch. For some reason it wasn't blocking the compilation for me, nor anyone else I guess, or we would have heard of it before - but that was still bad.

Now comes the funky part: I compile my kernel with MODVERSIONS. Only the compilation of the ".ver" file failed during the build process. This results in mismatching module symbols for i2c-core and i2c-algo-bit afterwards, so I was unable to load the module and had to take a closer look.

Quoted 3 lines

I opted for a different fix, dropping the conditional altogether. This branch of i2c is meant for Linux 2.4 only, so there's no point in keeping Linux 2.5+ compatibility code in there.

Nice.

Cheers,
Thomas