fix drivers/i2c/scx200_i2c.c compilation
PATCH 1/1 fix drivers/i2c/scx200_i2c.c compilation
I got the following compile error in 2.5.67:
<-- snip -->
...
gcc -Wp,-MD,drivers/i2c/.scx200_i2c.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -Iinclude/asm-i386/mach-default -nostdinc
-iwithprefix include -DKBUILD_BASENAME=scx200_i2c -DKBUILD_MODNAME=scx200_i2c
-c -o drivers/i2c/scx200_i2c.o drivers/i2c/scx200_i2c.c drivers/i2c/scx200_i2c.c:85: unknown field `name' specified in initializer drivers/i2c/scx200_i2c.c:85: warning: initialization makes integer from pointer without a castdrivers/i2c/scx200_i2c.c: In function `scx200_i2c_init':drivers/i2c/scx200_i2c.c:113: structure has no member named `name' make[2]: *** [drivers/i2c/scx200_i2c.o] Error 1
<-- snip -->
The following patch is needed:
drivers/i2c/scx200_i2c.c renamed from drivers/i2c/scx200_i2c.c.old +4 -2
@@ -82,9 +82,11 @@static struct i2c_adapter scx200_i2c_ops = { .owner =THIS_MODULE , - .name ="NatSemi SCx200 I2C" , .id =I2C_HW_B_VELLE , .algo_data = &scx200_i2c_data, + .dev = { + .name ="NatSemi SCx200 I2C" , + }, };int scx200_i2c_init (void )
@@ -110,7 +112,7 @@if (i2c_bit_add_bus (&scx200_i2c_ops) <0 ) { printk(KERN_ERR NAME ": adapter %s registration failed\n", - scx200_i2c_ops.name); + scx200_i2c_ops.dev.name);return -ENODEV ; }
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 3 lines · Adrian Bunk
I got the following compile error in 2.5.67:
<-- snip -->
Thanks, I just added this to my tree yesterday :)
I'll send it on to Linus in a bit.
greg k-h