linux-kernel.vger.kernel.org archive mirror
 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

* Re: [PATCH] i2c.h: Fix another gcc 4.0 compile failure
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2005-02-19 22:37 UTC (permalink / raw)
  To: Mickey Stein; +Cc: linux-kernel

On Sat, Feb 19, 2005 at 08:58:48AM -0800, Mickey Stein wrote:
> 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.

The patch looks sane, but before I apply it, care to also fix up all of
the function pointers that are affected by this patch?  Also the
i2c_transfer() function itself should be changed (not just the header
file.)

thanks,

greg k-h

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

* Re: [PATCH] i2c.h: Fix another gcc 4.0 compile failure
  2005-02-19 22:37 ` Greg KH
@ 2005-02-20 15:40   ` Mickey Stein
  2005-02-23 17:52     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Mickey Stein @ 2005-02-20 15:40 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

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

Greg KH wrote:

>On Sat, Feb 19, 2005 at 08:58:48AM -0800, Mickey Stein wrote:
>  
>
>>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.
>>    
>>
>
>The patch looks sane, but before I apply it, care to also fix up all of
>the function pointers that are affected by this patch?  Also the
>i2c_transfer() function itself should be changed (not just the header
>file.)
>
>thanks,
>
>greg k-h
>
>  
>
Greg,

I took a look for other references similar to those in my first take at 
this and found a couple more files.
Attached is another patch that hopefully addresses the all the similar 
cases.  I tried it on today's (-bk8) kernel,
with all i2c switches enabled.

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

 gcc4 cvs seems to dislike "include/linux/i2c.h, i2c-core.c files".

 I also tweaked the Documentation/i2c/writing-clients 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 i2c-transfer code in i2c.h  from "struct x y[]" 
format to "struct x *y".
 It also changes the associated i2c-transfer declarations in i2c-core.c.
 It tweaks the Documentation/i2c/writing-clients file to reconcile 
i2c-transfer docs.

 I realize its only a workaround, but the gcc guys seem to be aware of 
this.

Thanks very much,

Mickey Stein

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




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

--- ./include/linux/i2c.h.sav	2005-02-20 07:03:41.000000000 -0800
+++ ./include/linux/i2c.h	2005-02-20 07:14:26.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,
--- ./drivers/i2c/i2c-core.c.sav	2005-02-20 07:03:53.000000000 -0800
+++ ./drivers/i2c/i2c-core.c	2005-02-20 07:11:46.000000000 -0800
@@ -583,7 +583,7 @@
  * ----------------------------------------------------
  */
 
-int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg msgs[],int num)
+int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg *msgs,int num)
 {
 	int ret;
 
--- ./Documentation/i2c/writing-clients.sav	2005-02-20 07:05:12.000000000 -0800
+++ ./Documentation/i2c/writing-clients	2005-02-20 07:08:29.000000000 -0800
@@ -642,7 +642,7 @@
 parameter contains the bytes the read/write, the third the length of the
 buffer. Returned is the actual number of bytes read/written.
   
-  extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
+  extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg,
                           int num);
 
 This sends a series of messages. Each message can be a read or write,

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

* Re: [PATCH] i2c.h: Fix another gcc 4.0 compile failure
  2005-02-20 15:40   ` Mickey Stein
@ 2005-02-23 17:52     ` Greg KH
  2005-02-24 15:03       ` Corey Minyard
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2005-02-23 17:52 UTC (permalink / raw)
  To: Mickey Stein; +Cc: linux-kernel

On Sun, Feb 20, 2005 at 07:40:24AM -0800, Mickey Stein wrote:
> Greg KH wrote:
> 
> >On Sat, Feb 19, 2005 at 08:58:48AM -0800, Mickey Stein wrote:
> > 
> >
> >>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.
> >>   
> >>
> >
> >The patch looks sane, but before I apply it, care to also fix up all of
> >the function pointers that are affected by this patch?  Also the
> >i2c_transfer() function itself should be changed (not just the header
> >file.)
> >
> >thanks,
> >
> >greg k-h
> >
> > 
> >
> Greg,
> 
> I took a look for other references similar to those in my first take at 
> this and found a couple more files.
> Attached is another patch that hopefully addresses the all the similar 
> cases.  I tried it on today's (-bk8) kernel,
> with all i2c switches enabled.

What about the i2c drivers that implement the master_xfer function?  You
will now have a bunch of compiler warnings if you build them with this
patch, right?

thanks,

greg k-h

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

* Re: [PATCH] i2c.h: Fix another gcc 4.0 compile failure
  2005-02-23 17:52     ` Greg KH
@ 2005-02-24 15:03       ` Corey Minyard
  0 siblings, 0 replies; 5+ messages in thread
From: Corey Minyard @ 2005-02-24 15:03 UTC (permalink / raw)
  To: Greg KH; +Cc: Mickey Stein, linux-kernel

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

Greg, Mickey,

Since I already some of this patch done in the stuff I was working on, I 
finished it out.  Here's a patch that cleans up all of them and a few 
other small things I found.

-Corey

Greg KH wrote:

>On Sun, Feb 20, 2005 at 07:40:24AM -0800, Mickey Stein wrote:
>  
>
>>Greg KH wrote:
>>
>>    
>>
>>>On Sat, Feb 19, 2005 at 08:58:48AM -0800, Mickey Stein wrote:
>>>
>>>
>>>      
>>>
>>>>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.
>>>>  
>>>>
>>>>        
>>>>
>>>The patch looks sane, but before I apply it, care to also fix up all of
>>>the function pointers that are affected by this patch?  Also the
>>>i2c_transfer() function itself should be changed (not just the header
>>>file.)
>>>
>>>thanks,
>>>
>>>greg k-h
>>>
>>>
>>>
>>>      
>>>
>>Greg,
>>
>>I took a look for other references similar to those in my first take at 
>>this and found a couple more files.
>>Attached is another patch that hopefully addresses the all the similar 
>>cases.  I tried it on today's (-bk8) kernel,
>>with all i2c switches enabled.
>>    
>>
>
>What about the i2c drivers that implement the master_xfer function?  You
>will now have a bunch of compiler warnings if you build them with this
>patch, right?
>
>thanks,
>
>greg k-h
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>  
>


[-- Attachment #2: i2c_cleanup.diff --]
[-- Type: text/plain, Size: 12990 bytes --]

Clean up some general I2C things.  Convert all the msg[] in functions
to *msg, fix some grammar, put () around all the #defines that
are compound to avoid nasty side-effects, and convert some
initializations to C99 versions to make them more change-resistant.

Signed-off-by: Corey Minyard <minyard@acm.org>

Index: linux-2.6.11-rc4/include/linux/i2c.h
===================================================================
--- linux-2.6.11-rc4.orig/include/linux/i2c.h
+++ linux-2.6.11-rc4/include/linux/i2c.h
@@ -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. 
@@ -190,11 +190,11 @@
 	char name[32];				/* textual description 	*/
 	unsigned int id;
 
-	/* If an adapter algorithm can't to I2C-level access, set master_xfer
+	/* If an adapter algorithm can't do I2C-level access, set master_xfer
 	   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,
@@ -423,22 +423,22 @@
 #define I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC  0x40000000 /* SMBus 2.0 */
 #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC 0x80000000 /* SMBus 2.0 */
 
-#define I2C_FUNC_SMBUS_BYTE I2C_FUNC_SMBUS_READ_BYTE | \
-                            I2C_FUNC_SMBUS_WRITE_BYTE
-#define I2C_FUNC_SMBUS_BYTE_DATA I2C_FUNC_SMBUS_READ_BYTE_DATA | \
-                                 I2C_FUNC_SMBUS_WRITE_BYTE_DATA
-#define I2C_FUNC_SMBUS_WORD_DATA I2C_FUNC_SMBUS_READ_WORD_DATA | \
-                                 I2C_FUNC_SMBUS_WRITE_WORD_DATA
-#define I2C_FUNC_SMBUS_BLOCK_DATA I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
-                                  I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
-#define I2C_FUNC_SMBUS_I2C_BLOCK I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
-                                  I2C_FUNC_SMBUS_WRITE_I2C_BLOCK
-#define I2C_FUNC_SMBUS_I2C_BLOCK_2 I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \
-                                   I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2
-#define I2C_FUNC_SMBUS_BLOCK_DATA_PEC I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC | \
-                                      I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC
-#define I2C_FUNC_SMBUS_WORD_DATA_PEC  I2C_FUNC_SMBUS_READ_WORD_DATA_PEC | \
-                                      I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC
+#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
+                             I2C_FUNC_SMBUS_WRITE_BYTE)
+#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \
+                                  I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
+#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \
+                                  I2C_FUNC_SMBUS_WRITE_WORD_DATA)
+#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
+                                   I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
+#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
+                                  I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
+#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \
+                                    I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2)
+#define I2C_FUNC_SMBUS_BLOCK_DATA_PEC (I2C_FUNC_SMBUS_READ_BLOCK_DATA_PEC | \
+                                       I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC)
+#define I2C_FUNC_SMBUS_WORD_DATA_PEC  (I2C_FUNC_SMBUS_READ_WORD_DATA_PEC | \
+                                       I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC)
 
 #define I2C_FUNC_SMBUS_READ_BYTE_PEC		I2C_FUNC_SMBUS_READ_BYTE_DATA
 #define I2C_FUNC_SMBUS_WRITE_BYTE_PEC		I2C_FUNC_SMBUS_WRITE_BYTE_DATA
@@ -447,14 +447,14 @@
 #define I2C_FUNC_SMBUS_BYTE_PEC			I2C_FUNC_SMBUS_BYTE_DATA
 #define I2C_FUNC_SMBUS_BYTE_DATA_PEC		I2C_FUNC_SMBUS_WORD_DATA
 
-#define I2C_FUNC_SMBUS_EMUL I2C_FUNC_SMBUS_QUICK | \
-                            I2C_FUNC_SMBUS_BYTE | \
-                            I2C_FUNC_SMBUS_BYTE_DATA | \
-                            I2C_FUNC_SMBUS_WORD_DATA | \
-                            I2C_FUNC_SMBUS_PROC_CALL | \
-                            I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
-                            I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC | \
-                            I2C_FUNC_SMBUS_I2C_BLOCK
+#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
+                             I2C_FUNC_SMBUS_BYTE | \
+                             I2C_FUNC_SMBUS_BYTE_DATA | \
+                             I2C_FUNC_SMBUS_WORD_DATA | \
+                             I2C_FUNC_SMBUS_PROC_CALL | \
+                             I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
+                             I2C_FUNC_SMBUS_WRITE_BLOCK_DATA_PEC | \
+                             I2C_FUNC_SMBUS_I2C_BLOCK)
 
 /* 
  * Data for SMBus Messages 
Index: linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-bit.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/algos/i2c-algo-bit.c
+++ linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-bit.c
@@ -466,7 +466,7 @@
 }
 
 static int bit_xfer(struct i2c_adapter *i2c_adap,
-		    struct i2c_msg msgs[], int num)
+		    struct i2c_msg *msgs, int num)
 {
 	struct i2c_msg *pmsg;
 	struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
Index: linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-pcf.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/algos/i2c-algo-pcf.c
+++ linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-pcf.c
@@ -332,7 +332,7 @@
 }
 
 static int pcf_xfer(struct i2c_adapter *i2c_adap,
-		    struct i2c_msg msgs[], 
+		    struct i2c_msg *msgs, 
 		    int num)
 {
 	struct i2c_algo_pcf_data *adap = i2c_adap->algo_data;
Index: linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-pca.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/algos/i2c-algo-pca.c
+++ linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-pca.c
@@ -178,7 +178,7 @@
 }
 
 static int pca_xfer(struct i2c_adapter *i2c_adap,
-                    struct i2c_msg msgs[],
+                    struct i2c_msg *msgs,
                     int num)
 {
         struct i2c_algo_pca_data *adap = i2c_adap->algo_data;
Index: linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-ite.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/algos/i2c-algo-ite.c
+++ linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-ite.c
@@ -600,7 +600,7 @@
  * verify that the bus is not busy or in some unknown state.
  */
 static int iic_xfer(struct i2c_adapter *i2c_adap,
-		    struct i2c_msg msgs[], 
+		    struct i2c_msg *msgs, 
 		    int num)
 {
 	struct i2c_algo_iic_data *adap = i2c_adap->algo_data;
@@ -713,14 +713,11 @@
 /* -----exported algorithm data: -------------------------------------	*/
 
 static struct i2c_algorithm iic_algo = {
-	"ITE IIC algorithm",
-	I2C_ALGO_IIC,
-	iic_xfer,		/* master_xfer	*/
-	NULL,				/* smbus_xfer	*/
-	NULL,				/* slave_xmit		*/
-	NULL,				/* slave_recv		*/
-	algo_control,			/* ioctl		*/
-	iic_func,			/* functionality	*/
+	.name		= "ITE IIC algorithm",
+	.id		= I2C_ALGO_IIC,
+	.master_xfer	= iic_xfer,
+	.ioctl		= algo_control,
+	.functionality	= iic_func,
 };
 
 
Index: linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-sgi.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/algos/i2c-algo-sgi.c
+++ linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-sgi.c
@@ -131,7 +131,7 @@
 	return 0;
 }
 
-static int sgi_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[],
+static int sgi_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs,
 		    int num)
 {
 	struct i2c_algo_sgi_data *adap = i2c_adap->algo_data;
Index: linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-sibyte.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/algos/i2c-algo-sibyte.c
+++ linux-2.6.11-rc4/drivers/i2c/algos/i2c-algo-sibyte.c
@@ -136,14 +136,11 @@
 /* -----exported algorithm data: -------------------------------------	*/
 
 static struct i2c_algorithm i2c_sibyte_algo = {
-	"SiByte algorithm",
-	I2C_ALGO_SIBYTE,
-	NULL,                           /* master_xfer          */
-	smbus_xfer,                   	/* smbus_xfer           */
-	NULL,				/* slave_xmit		*/
-	NULL,				/* slave_recv		*/
-	algo_control,			/* ioctl		*/
-	bit_func,			/* functionality	*/
+	.name		= "SiByte algorithm",
+	.id		= I2C_ALGO_SIBYTE,
+	.smbus_xfer	= smbus_xfer,
+	.ioctl		= algo_control,
+	.functionality	= bit_func,
 };
 
 /* 
Index: linux-2.6.11-rc4/drivers/i2c/busses/i2c-mpc.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/busses/i2c-mpc.c
+++ linux-2.6.11-rc4/drivers/i2c/busses/i2c-mpc.c
@@ -233,7 +233,7 @@
 	return length;
 }
 
-static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
+static int mpc_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 {
 	struct i2c_msg *pmsg;
 	int i;
Index: linux-2.6.11-rc4/drivers/i2c/busses/i2c-s3c2410.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/busses/i2c-s3c2410.c
+++ linux-2.6.11-rc4/drivers/i2c/busses/i2c-s3c2410.c
@@ -534,7 +534,7 @@
 */
 
 static int s3c24xx_i2c_xfer(struct i2c_adapter *adap,
-			struct i2c_msg msgs[], int num)
+			struct i2c_msg *msgs, int num)
 {
 	struct s3c24xx_i2c *i2c = (struct s3c24xx_i2c *)adap->algo_data;
 	int retry;
Index: linux-2.6.11-rc4/drivers/i2c/busses/i2c-au1550.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/busses/i2c-au1550.c
+++ linux-2.6.11-rc4/drivers/i2c/busses/i2c-au1550.c
@@ -253,7 +253,7 @@
 }
 
 static int
-au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
+au1550_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
 {
 	struct i2c_au1550_data *adap = i2c_adap->algo_data;
 	struct i2c_msg *p;
Index: linux-2.6.11-rc4/drivers/i2c/busses/i2c-iop3xx.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/busses/i2c-iop3xx.c
+++ linux-2.6.11-rc4/drivers/i2c/busses/i2c-iop3xx.c
@@ -361,7 +361,7 @@
  * master_xfer() - main read/write entry
  */
 static int 
-iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], 
+iop3xx_i2c_master_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, 
 				int num)
 {
 	struct i2c_algo_iop3xx_data *iop3xx_adap = i2c_adap->algo_data;
Index: linux-2.6.11-rc4/drivers/i2c/busses/i2c-keywest.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/busses/i2c-keywest.c
+++ linux-2.6.11-rc4/drivers/i2c/busses/i2c-keywest.c
@@ -399,7 +399,7 @@
  */
 static int
 keywest_xfer(	struct i2c_adapter *adap,
-		struct i2c_msg msgs[], 
+		struct i2c_msg *msgs, 
 		int num)
 {
 	struct keywest_chan* chan = i2c_get_adapdata(adap);
Index: linux-2.6.11-rc4/drivers/i2c/busses/i2c-ibm_iic.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/busses/i2c-ibm_iic.c
+++ linux-2.6.11-rc4/drivers/i2c/busses/i2c-ibm_iic.c
@@ -549,7 +549,7 @@
  * Generic master transfer entrypoint. 
  * Returns the number of processed messages or error (<0)
  */
-static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
+static int iic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 {
     	struct ibm_iic_private* dev = (struct ibm_iic_private*)(i2c_get_adapdata(adap));
 	volatile struct iic_regs __iomem *iic = dev->vaddr;
Index: linux-2.6.11-rc4/drivers/i2c/i2c-core.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/i2c/i2c-core.c
+++ linux-2.6.11-rc4/drivers/i2c/i2c-core.c
@@ -583,7 +583,7 @@
  * ----------------------------------------------------
  */
 
-int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg msgs[],int num)
+int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg *msgs,int num)
 {
 	int ret;
 
Index: linux-2.6.11-rc4/drivers/media/video/bttv-i2c.c
===================================================================
--- linux-2.6.11-rc4.orig/drivers/media/video/bttv-i2c.c
+++ linux-2.6.11-rc4/drivers/media/video/bttv-i2c.c
@@ -245,7 +245,7 @@
        	return retval;
 }
 
-static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
+static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
 {
 	struct bttv *btv = i2c_get_adapdata(i2c_adap);
 	int retval = 0;

^ 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;
as well as URLs for NNTP newsgroup(s).