mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Shubhrajyoti D <shubhrajyoti@ti.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	julia.lawall@lip6.fr
Subject: Re: [PATCHv3 5/6] media: Convert struct i2c_msg initialization to C99 format
Date: Tue, 18 Sep 2012 14:42:26 +0300	[thread overview]
Message-ID: <20120918114224.GH24047@arwen.pp.htv.fi> (raw)
In-Reply-To: <1347968672-10803-6-git-send-email-shubhrajyoti@ti.com>

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

On Tue, Sep 18, 2012 at 05:14:31PM +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.

no need for these tabs here.

FWIW:

Reviewed-by: Felipe Balbi <balbi@ti.com>

> 
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
> ---
>  drivers/media/radio/saa7706h.c |   15 +++++++++++++--
>  1 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/radio/saa7706h.c b/drivers/media/radio/saa7706h.c
> index bb953ef..54db36c 100644
> --- a/drivers/media/radio/saa7706h.c
> +++ b/drivers/media/radio/saa7706h.c
> @@ -199,8 +199,19 @@ static int saa7706h_get_reg16(struct v4l2_subdev *sd, u16 reg)
>  	u8 buf[2];
>  	int err;
>  	u8 regaddr[] = {reg >> 8, reg};
> -	struct i2c_msg msg[] = { {client->addr, 0, sizeof(regaddr), regaddr},
> -				{client->addr, I2C_M_RD, sizeof(buf), buf} };
> +	struct i2c_msg msg[] = {
> +					{
> +						.addr = client->addr,
> +						.len = sizeof(regaddr),
> +						.buf = regaddr
> +					},
> +					{
> +						.addr = client->addr,
> +						.flags = I2C_M_RD,
> +						.len = sizeof(buf),
> +						.buf = buf
> +					}
> +				};
>  
>  	err = saa7706h_i2c_transfer(client, msg, ARRAY_SIZE(msg));
>  	if (err)
> -- 
> 1.7.5.4
> 
> --
> 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/

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-09-18 11:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18 11:44 [PATCHv3 0/6] media: convert to c99 format Shubhrajyoti D
2012-09-18 11:44 ` [PATCHv3 1/6] media: Convert struct i2c_msg initialization to C99 format Shubhrajyoti D
2012-09-18 11:44 ` [PATCHv3 2/6] " Shubhrajyoti D
2012-09-18 11:44 ` [PATCHv3 3/6] " Shubhrajyoti D
2012-09-18 11:44 ` [PATCHv3 4/6] " Shubhrajyoti D
2012-09-18 11:44 ` [PATCHv3 5/6] " Shubhrajyoti D
2012-09-18 11:42   ` Felipe Balbi [this message]
2012-09-18 12:19     ` Shubhrajyoti
2012-09-18 11:44 ` [PATCHv3 6/6] " Shubhrajyoti D
2012-09-25 11:03 ` [PATCHv3 0/6] media: convert to c99 format Ezequiel Garcia
2012-09-25 11:09   ` Mauro Carvalho Chehab
2012-09-25 11:13     ` Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120918114224.GH24047@arwen.pp.htv.fi \
    --to=balbi@ti.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=shubhrajyoti@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®