From: Christian Gmeiner <christian.gmeiner@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input <linux-input@vger.kernel.org>
Subject: Re: [PATCH] Input: Add Microchip AR1021 i2c touchscreen
Date: Thu, 9 Oct 2014 09:39:32 +0200 [thread overview]
Message-ID: <CAH9NwWd95RL996nWWYi-shX5uJFTWpFRt56ftQ6-fgLUShHo-g@mail.gmail.com> (raw)
In-Reply-To: <20141008175649.GB14423@dtor-ws>
Hi Dmitry,
> On Wed, Oct 08, 2014 at 04:45:18PM +0200, Christian Gmeiner wrote:
>> +static irqreturn_t ar1021_i2c_irq(int irq, void *dev_id)
>> +{
>> + struct ar1021_i2c *ar1021 = dev_id;
>> + struct input_dev *input = ar1021->input;
>> + u8 *data = ar1021->data;
>> + unsigned int x, y, button;
>> + int error;
>> +
>> + error = i2c_master_recv(ar1021->client,
>> + ar1021->data, sizeof(ar1021->data));
>> + if (error < 0)
>
> I think this check should be "if (retval != sizeof(ar1021->data))" to
> avoid using garbage data in case of short read. I'll change it locally
> and apply the patch.
Sounds good to me.
thanks
--
Christian Gmeiner, MSc
https://soundcloud.com/christian-gmeiner
prev parent reply other threads:[~2014-10-09 7:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 14:45 [PATCH] Input: Add Microchip AR1021 i2c touchscreen Christian Gmeiner
2014-10-08 17:56 ` Dmitry Torokhov
2014-10-09 7:39 ` Christian Gmeiner [this message]
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=CAH9NwWd95RL996nWWYi-shX5uJFTWpFRt56ftQ6-fgLUShHo-g@mail.gmail.com \
--to=christian.gmeiner@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.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).