* [PATCH] mfd: Convert struct i2c_msg initialization to C99 format
@ 2012-09-17 15:44 Shubhrajyoti D
2012-09-19 11:28 ` Samuel Ortiz
0 siblings, 1 reply; 3+ messages in thread
From: Shubhrajyoti D @ 2012-09-17 15:44 UTC (permalink / raw)
To: sameo; +Cc: linux-kernel, julia.lawall, Shubhrajyoti D
Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.
Thanks to Julia Lawall <julia.lawall@lip6.fr> for automating the conversion
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
drivers/mfd/88pm860x-i2c.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/88pm860x-i2c.c b/drivers/mfd/88pm860x-i2c.c
index b2cfdc4..de322b6 100644
--- a/drivers/mfd/88pm860x-i2c.c
+++ b/drivers/mfd/88pm860x-i2c.c
@@ -91,8 +91,18 @@ static int read_device(struct i2c_client *i2c, int reg,
unsigned char msgbuf0[I2C_SMBUS_BLOCK_MAX + 3];
unsigned char msgbuf1[I2C_SMBUS_BLOCK_MAX + 2];
struct i2c_adapter *adap = i2c->adapter;
- struct i2c_msg msg[2] = {{i2c->addr, 0, 1, msgbuf0},
- {i2c->addr, I2C_M_RD, 0, msgbuf1},
+ struct i2c_msg msg[2] = {
+ {
+ .addr = i2c->addr,
+ .flags = 0,
+ .len = 1,
+ .buf = msgbuf0
+ },
+ { .addr = i2c->addr,
+ .flags = I2C_M_RD,
+ .len = 0,
+ .buf = msgbuf1
+ },
};
int num = 1, ret = 0;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: Convert struct i2c_msg initialization to C99 format
2012-09-17 15:44 [PATCH] mfd: Convert struct i2c_msg initialization to C99 format Shubhrajyoti D
@ 2012-09-19 11:28 ` Samuel Ortiz
2012-09-19 14:02 ` Shubhrajyoti
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Ortiz @ 2012-09-19 11:28 UTC (permalink / raw)
To: Shubhrajyoti D; +Cc: linux-kernel, julia.lawall
Hi Shubhrajyoti,
On Mon, Sep 17, 2012 at 09:14:58PM +0530, Shubhrajyoti D wrote:
> Convert the struct i2c_msg initialization to C99 format. This makes
> maintaining and editing the code simpler. Also helps once other fields
> like transferred are added in future.
>
> Thanks to Julia Lawall <julia.lawall@lip6.fr> for automating the conversion
>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
> drivers/mfd/88pm860x-i2c.c | 14 ++++++++++++--
> 1 files changed, 12 insertions(+), 2 deletions(-)
Patch applied, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: Convert struct i2c_msg initialization to C99 format
2012-09-19 11:28 ` Samuel Ortiz
@ 2012-09-19 14:02 ` Shubhrajyoti
0 siblings, 0 replies; 3+ messages in thread
From: Shubhrajyoti @ 2012-09-19 14:02 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: linux-kernel, julia.lawall
On Wednesday 19 September 2012 04:58 PM, Samuel Ortiz wrote:
>> drivers/mfd/88pm860x-i2c.c | 14 ++++++++++++--
>> > 1 files changed, 12 insertions(+), 2 deletions(-)
> Patch applied, thanks.
thanks.
>
> Cheers,
> Samuel.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-19 14:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-17 15:44 [PATCH] mfd: Convert struct i2c_msg initialization to C99 format Shubhrajyoti D
2012-09-19 11:28 ` Samuel Ortiz
2012-09-19 14:02 ` Shubhrajyoti
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).