Skip to contentSkip to conversation

Error compiling ieee1394/pcilynx.c (2.5.54)

DISCUSSION Tariq Shureih 2 participants 2 messages Jan 16, 2003

lore
Share & tools
lore
#0 lore raw

As part of my work on the Kernel-Janitor project, I am looking at the use of panic() in driver (char for now).

The pcilynx.c driver will not compile giving the following error. I enabled I2C bit-bangin options as required by the driver.

Seems that the driver requires porting to 2.5.x since the i2c structures and implementation has changed in 2.5.x.

Anyone working on this? I can't proceed with my work not having this compile.

Thanx

-------------

gcc -Wp,-MD,drivers/ieee1394/.iso.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=pentium4 -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include -DMODULE
-DKBUILD_BASENAME=iso -DKBUILD_MODNAME=ieee1394 -c -o
drivers/ieee1394/iso.o drivers/ieee1394/iso.c
ld -m elf_i386 -r -o drivers/ieee1394/ieee1394.ko
drivers/ieee1394/ieee1394_core.o drivers/ieee1394/ieee1394_transactions.o drivers/ieee1394/hosts.o drivers/ieee1394/highlevel.o drivers/ieee1394/csr.o drivers/ieee1394/nodemgr.o drivers/ieee1394/oui.o drivers/ieee1394/dma.o drivers/ieee1394/iso.o
gcc -Wp,-MD,drivers/ieee1394/.pcilynx.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=pentium4 -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include -DMODULE
-DKBUILD_BASENAME=pcilynx -DKBUILD_MODNAME=pcilynx -c -o
drivers/ieee1394/pcilynx.o drivers/ieee1394/pcilynx.c drivers/ieee1394/pcilynx.c:139: warning: initialization from incompatible pointer type
drivers/ieee1394/pcilynx.c:140: warning: missing braces around initializer drivers/ieee1394/pcilynx.c:140: warning: (near initialization for
`bit_ops.name')
drivers/ieee1394/pcilynx.c:141: warning: initialization makes integer from pointer without a cast
drivers/ieee1394/pcilynx.c:142: warning: initialization makes integer from pointer without a cast
drivers/ieee1394/pcilynx.c:143: warning: initialization makes integer from pointer without a cast
drivers/ieee1394/pcilynx.c:144: warning: initialization makes integer from pointer without a cast
drivers/ieee1394/pcilynx.c:145: warning: initialization makes integer from pointer without a cast
drivers/ieee1394/pcilynx.c:145: initializer element is not computable at load time
drivers/ieee1394/pcilynx.c:145: (near initialization for `bit_ops.name[5]') drivers/ieee1394/pcilynx.c:146: warning:
initialization makes integer from pointer without a cast drivers/ieee1394/pcilynx.c:146: initializer element is not computable at load time
drivers/ieee1394/pcilynx.c:146: (near initialization for bit_ops.name[6]') drivers/ieee1394/pcilynx.c:147: initializer element is not constant drivers/ieee1394/pcilynx.c:147: (near initialization for bit_ops.name') drivers/ieee1394/pcilynx.c: In function `lynx_devctl':
drivers/ieee1394/pcilynx.c:763: warning: _MOD_INC_USE_COUNT' is deprecated (declared at include/linux/module.h:346) drivers/ieee1394/pcilynx.c:765: warning: __MOD_DEC_USE_COUNT' is deprecated (declared at include/linux/module.h:321)
make[2]: *** [drivers/ieee1394/pcilynx.o] Error 1
make[1]: *** [drivers/ieee1394] Error 2
make: *** [drivers] Error 2

Signature · 3 lines
The greatest enemy to knowledge is not ignorance.  It's the illusion of
knowledge.  Thus the devil's greatest achievement was making people
believe he didn't exist!
#1 lore raw
Quoted 9 lines · Tariq Shureih

...
The pcilynx.c driver will not compile giving the following error. I enabled I2C bit-bangin options as required by the driver.

Seems that the driver requires porting to 2.5.x since the i2c structures and implementation has changed in 2.5.x.

Anyone working on this? I can't proceed with my work not having this compile.

Below is the fix (already sent to Ben Collins).

Quoted 1 line

Thanx

cu
Adrian

drivers/ieee1394/pcilynx.c renamed from drivers/ieee1394/pcilynx.c.old +11 -14
@@ -127,23 +127,20 @@
 }
 
 static struct i2c_algo_bit_data bit_data = {
-	NULL,
-	bit_setsda,
-	bit_setscl,
-	bit_getsda,
-	bit_getscl,
-	5, 5, 100,		/*	waits, timeout */
+	.setsda			= bit_setsda,
+	.setscl			= bit_setscl,
+	.getsda			= bit_getsda,
+	.getscl			= bit_getscl,
+	.udelay			= 5,
+	.mdelay			= 5,
+	.timeout		= 100,
 }; 
 
 static struct i2c_adapter bit_ops = {
-	"PCILynx I2C adapter",
-	0xAA, //FIXME: probably we should get an id in i2c-id.h
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	bit_reg,
-	bit_unreg,
+	.name			= "PCILynx I2C adapter",
+	.id 			= 0xAA, //FIXME: probably we should get an id in i2c-id.h
+	.client_register	= bit_reg,
+	.client_unregister	= bit_unreg,
 };