aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/adv7604.c
diff options
context:
space:
mode:
authorShubhrajyoti D <shubhrajyoti@ti.com>2012-10-25 00:02:36 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-21 15:09:59 -0500
commit09f29673857a499dcf9a3baa896faf791d06812f (patch)
treed7ea554f86521d5ec43cc629e7a7b53d381c5f04 /drivers/media/i2c/adv7604.c
parent37b0b4e90d799cddfdd5d0a90ed470933f7e9859 (diff)
[media] adv7604: convert struct i2c_msg initialization to C99 format
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. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/adv7604.c')
-rw-r--r--drivers/media/i2c/adv7604.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 109bc9b12e74..89fc85403ca2 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -403,9 +403,19 @@ static inline int edid_read_block(struct v4l2_subdev *sd, unsigned len, u8 *val)
403 struct i2c_client *client = state->i2c_edid; 403 struct i2c_client *client = state->i2c_edid;
404 u8 msgbuf0[1] = { 0 }; 404 u8 msgbuf0[1] = { 0 };
405 u8 msgbuf1[256]; 405 u8 msgbuf1[256];
406 struct i2c_msg msg[2] = { { client->addr, 0, 1, msgbuf0 }, 406 struct i2c_msg msg[2] = {
407 { client->addr, 0 | I2C_M_RD, len, msgbuf1 } 407 {
408 }; 408 .addr = client->addr,
409 .len = 1,
410 .buf = msgbuf0
411 },
412 {
413 .addr = client->addr,
414 .flags = I2C_M_RD,
415 .len = len,
416 .buf = msgbuf1
417 },
418 };
409 419
410 if (i2c_transfer(client->adapter, msg, 2) < 0) 420 if (i2c_transfer(client->adapter, msg, 2) < 0)
411 return -EIO; 421 return -EIO;