From: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Shubhrajyoti Datta
<omaplinuxkernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/4] input: Convert struct i2c_msg initialization to C99 format
Date: Fri, 12 Oct 2012 23:19:22 -0700 [thread overview]
Message-ID: <20121013061922.GC10969@core.coreip.homeip.net> (raw)
In-Reply-To: <CAM=Q2ctFe29-Dyi+jn6s=-ybQBzXoNERSXeXCQwSCsKUAv8=XA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, Oct 10, 2012 at 05:05:39PM +0530, Shubhrajyoti Datta wrote:
> On Wed, Oct 10, 2012 at 2:32 PM, Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org> wrote:
> > On Tue, 9 Oct 2012 17:01:18 +0530, Shubhrajyoti D wrote:
> [...]
> >
> > Acked-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
>
>
> thanks updated patch below
> From 6638ecfa7982f95815382922c50573712c9626d7 Mon Sep 17 00:00:00 2001
> From: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
> Date: Mon, 17 Sep 2012 19:37:17 +0530
> Subject: [PATCHv2 1/2] input: 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.
>
> Thanks to Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org> for automating the conversion
>
> Acked-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
Applied both, thanks Shubhrajyoti.
> ---
> drivers/input/touchscreen/cy8ctmg110_ts.c | 13 +++++++++++--
> 1 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c
> b/drivers/input/touchscreen/cy8ctmg110_ts.c
> index 464f1bf..ad6a664 100644
> --- a/drivers/input/touchscreen/cy8ctmg110_ts.c
> +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c
> @@ -99,9 +99,18 @@ static int cy8ctmg110_read_regs(struct cy8ctmg110 *tsc,
> int ret;
> struct i2c_msg msg[2] = {
> /* first write slave position to i2c devices */
> - { client->addr, 0, 1, &cmd },
> + {
> + .addr = client->addr,
> + .len = 1,
> + .buf = &cmd
> + },
> /* Second read data from position */
> - { client->addr, I2C_M_RD, len, data }
> + {
> + .addr = client->addr,
> + .flags = I2C_M_RD,
> + .len = len,
> + .buf = data
> + }
> };
>
> ret = i2c_transfer(client->adapter, msg, 2);
> --
> 1.7.5.4
--
Dmitry
next prev parent reply other threads:[~2012-10-13 6:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 11:31 [PATCH 1/4] input: Convert struct i2c_msg initialization to C99 format Shubhrajyoti D
2012-10-09 11:31 ` [PATCH 2/4] " Shubhrajyoti D
[not found] ` <1349782278-9023-2-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-10-10 9:02 ` Jean Delvare
2012-10-10 11:35 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2ctFe29-Dyi+jn6s=-ybQBzXoNERSXeXCQwSCsKUAv8=XA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-13 6:19 ` Dmitry Torokhov [this message]
2012-10-10 8:59 ` [PATCH 1/4] " Jean Delvare
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=20121013061922.GC10969@core.coreip.homeip.net \
--to=dmitry.torokhov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=omaplinuxkernel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=shubhrajyoti-l0cyMroinI0@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).