lkml.org 
[lkml]   [2015]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number.
On Wed, Apr 15, 2015 at 09:55:43AM +0800, DusonLin wrote:
> The trace number does not need to subtract 1 now.

Could you provide a bit more of background for this change? Why don't we
need to decrement the number returned by the firmware anymore? We have
been running with the old numbers for many years...

Thanks!

>
> Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
> ---
> drivers/input/mouse/elan_i2c_i2c.c | 4 ++--
> drivers/input/mouse/elan_i2c_smbus.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/mouse/elan_i2c_i2c.c
> b/drivers/input/mouse/elan_i2c_i2c.c
> index 029941f..550f905 100644
> --- a/drivers/input/mouse/elan_i2c_i2c.c
> +++ b/drivers/input/mouse/elan_i2c_i2c.c
> @@ -356,8 +356,8 @@ static int elan_i2c_get_num_traces(struct i2c_client
> *client,
> return error;
> }
>
> - *x_traces = val[0] - 1;
> - *y_traces = val[1] - 1;
> + *x_traces = val[0];
> + *y_traces = val[1];
>
> return 0;
> }
> diff --git a/drivers/input/mouse/elan_i2c_smbus.c
> b/drivers/input/mouse/elan_i2c_smbus.c
> index 06a2bcd..0b04151 100644
> --- a/drivers/input/mouse/elan_i2c_smbus.c
> +++ b/drivers/input/mouse/elan_i2c_smbus.c
> @@ -268,8 +268,8 @@ static int elan_smbus_get_num_traces(struct i2c_client
> *client,
> return error;
> }
>
> - *x_traces = val[1] - 1;
> - *y_traces = val[2] - 1;
> + *x_traces = val[1];
> + *y_traces = val[2];
>
> return 0;
> }
>

--
Dmitry


\
 
 \ /
  Last update: 2015-04-15 20:01    [W:0.052 / U:1.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site