summaryrefslogtreecommitdiff
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorJingle Wu <jingle.wu@emc.com.tw>2020-07-15 22:12:08 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-07-17 17:35:59 -0700
commit40d8aa97131d16fe880cd48f8faabcd6a45019c4 (patch)
treea547561272b621dd7737569a5205b1dd16a03014 /drivers/input/mouse
parentfc7c882aa9b1643273c4bb77d31163355dcbc0b8 (diff)
Input: elan_i2c - handle devices with patterns above 1
Extend fetching and parsing parameters of the controllers to devices with "patterns" above 1 (which currently should be handled in the same fashion as devices with pattern 1). Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/elan_i2c_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/mouse/elan_i2c_i2c.c b/drivers/input/mouse/elan_i2c_i2c.c
index bceb4bc32697..bb499f0d0925 100644
--- a/drivers/input/mouse/elan_i2c_i2c.c
+++ b/drivers/input/mouse/elan_i2c_i2c.c
@@ -284,7 +284,7 @@ static int elan_i2c_get_version(struct i2c_client *client,
return error;
}
- if (pattern_ver == 0x01)
+ if (pattern_ver >= 0x01)
*version = iap ? val[1] : val[0];
else
*version = val[0];
@@ -305,7 +305,7 @@ static int elan_i2c_get_sm_version(struct i2c_client *client,
return error;
}
- if (pattern_ver == 0x01) {
+ if (pattern_ver >= 0x01) {
error = elan_i2c_read_cmd(client, ETP_I2C_IC_TYPE_CMD, val);
if (error) {
dev_err(&client->dev, "failed to get ic type: %d\n",