public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c.h: Fix another gcc 4.0 compile failure
@ 2005-02-19 16:58 Mickey Stein
  2005-02-19 22:37 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Mickey Stein @ 2005-02-19 16:58 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]

From: Mickey Stein
  Versions:   linux-2.6.11-rc4-bk7, gcc4 (GCC) 4.0.0 20050217 (latest fc 
rawhide from 19Feb DL)

  gcc4 cvs seems to dislike "include/linux/i2c.h file":
 
  Error msg:   include/linux/i2c.h:{55,194} error: array type has 
incomplete element type
 
  A. Daplas has recently done a workaround for this on another header 
file. A thread discussing this
  can be found by following the link below:
 
  http://gcc.gnu.org/ml/gcc/2005-02/msg00053.html
 
  The patch changes the array declaration from "struct x y[]" format to 
"struct x *y".
  I realize its only a workaround, but the gcc guys seem to be aware of 
this.
  ** Note: I'm a noob at this, so feel free to make chopped liver out of 
this if its incorrect.
  patch below is also attached since I'm not sure formatting survives 
the cut&paste.

 
  Signed-off-by: Mickey Stein <yekkim@pacbell.net>
 
---

--- include/linux/i2c.h.sav     2005-02-19 07:02:52.000000000 -0800
+++ include/linux/i2c.h 2005-02-19 07:26:22.000000000 -0800
@@ -55,7 +55,7 @@

 /* Transfer num messages.
  */
-extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg 
msg[],int num)
;
+extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg 
*msg,int num);

 /*
  * Some adapter types (i.e. PCF 8584 based ones) may support slave 
behaviuor.
@@ -194,7 +194,7 @@
           to NULL. If an adapter algorithm can do SMBus access, set
           smbus_xfer. If set to NULL, the SMBus protocol is simulated
           using common I2C messages */
-       int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
+       int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
                           int num);
        int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
                           unsigned short flags, char read_write,


[-- Attachment #2: i2c.h.patch --]
[-- Type: text/plain, Size: 896 bytes --]

--- include/linux/i2c.h.sav	2005-02-19 07:02:52.000000000 -0800
+++ include/linux/i2c.h	2005-02-19 07:26:22.000000000 -0800
@@ -55,7 +55,7 @@
 
 /* Transfer num messages.
  */
-extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
+extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg,int num);
 
 /*
  * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor. 
@@ -194,7 +194,7 @@
 	   to NULL. If an adapter algorithm can do SMBus access, set 
 	   smbus_xfer. If set to NULL, the SMBus protocol is simulated
 	   using common I2C messages */
-	int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[], 
+	int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, 
 	                   int num);
 	int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, 
 	                   unsigned short flags, char read_write,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-02-24 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-19 16:58 [PATCH] i2c.h: Fix another gcc 4.0 compile failure Mickey Stein
2005-02-19 22:37 ` Greg KH
2005-02-20 15:40   ` Mickey Stein
2005-02-23 17:52     ` Greg KH
2005-02-24 15:03       ` Corey Minyard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox