Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1166441

Re: [PATCH] Input: pixcir_i2c_ts - fix receive error

Path csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Dmitry Torokhov <dmitry.torokhov@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Input: pixcir_i2c_ts - fix receive error
Date Wed, 17 Jun 2015 00:10:01 +0200
Message-ID <pC7dn-787-5@gated-at.bofh.it> (permalink)
References <pC5lg-4rn-19@gated-at.bofh.it>
X-Original-To Frodo Lai <frodo.lai@gmail.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=YDZTVX1g+Z29lsYA4HMb6koz5DeZPK9rnqsos7nmMeg=; b=t1+93PDAZ+Ov4PxZ2KEsS1oCR9kD0YOYdsnGzJZVE208ZwSaY0XTYpnzVqLTBGKSMF /jw4TNWFX6SeFq8HwknEPWBtG54v7dcYtStPl5Uol0/IYHD1hlHxyWR13abSD100CXNf 5Ph1Wv3+mW7fvV65QocGo/LtjxGtlPAAhyaxN2o54Ox62q8ISyx3AgD0LIz1/uxGrrMM KWUhcanLttSQXdlvQR9ajDUZTddjwgPDkUZAKrr7IBfwDMN0sPQ8CSaPftZ1jEOQGjRk 37tusvZnm6hDCA4Uxb3O843IcOkzDAiSkG+EUg+reRpAOhMLA0irXRAgg09dxUN7qv6v ICsw==
X-Received by 10.43.40.130 with SMTP id tq2mr5414124icb.46.1434492467154; Tue, 16 Jun 2015 15:07:47 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 38
Organization linux.* mail to news gateway
X-Original-Cc rogerq@ti.com, rydberg@bitmath.org, jg1.han@samsung.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
X-Original-Date Tue, 16 Jun 2015 15:07:43 -0700
X-Original-Message-ID <20150616220743.GB17610@dtor-ws>
X-Original-References <1434484984-15418-1-git-send-email-frodo_lai@bcmcom.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1166441

Show key headers only | View raw


On Tue, Jun 16, 2015 at 01:03:04PM -0700, Frodo Lai wrote:
> The i2c_master_recv() uses readsize to receive data from i2c but
> compares to size of rdbuf which is always 27. This would casue
> problem when the max_fingers is not 5. Change the comparison value
> to readsize instead.
> 
> Signed-off-by: Frodo Lai <frodo_lai@bcmcom.com>

Applied, thank you.

> ---
>  drivers/input/touchscreen/pixcir_i2c_ts.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c
> index 2c21071..8f3e243 100644
> --- a/drivers/input/touchscreen/pixcir_i2c_ts.c
> +++ b/drivers/input/touchscreen/pixcir_i2c_ts.c
> @@ -78,7 +78,7 @@ static void pixcir_ts_parse(struct pixcir_i2c_ts_data *tsdata,
>  	}
>  
>  	ret = i2c_master_recv(tsdata->client, rdbuf, readsize);
> -	if (ret != sizeof(rdbuf)) {
> +	if (ret != readsize) {
>  		dev_err(&tsdata->client->dev,
>  			"%s: i2c_master_recv failed(), ret=%d\n",
>  			__func__, ret);
> -- 
> 1.7.9.5
> 

-- 
Dmitry
--
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/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] Input: pixcir_i2c_ts - fix receive error Frodo Lai <frodo.lai@gmail.com> - 2015-06-16 22:10 +0200
  Re: [PATCH] Input: pixcir_i2c_ts - fix receive error Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-06-17 00:10 +0200

csiph-web