Skip to content

Commit

Permalink
Input: elan_i2c - handle devices with patterns above 1
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingle Wu authored and Dmitry Torokhov committed Jul 18, 2020
1 parent fc7c882 commit 40d8aa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/mouse/elan_i2c_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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",
Expand Down

0 comments on commit 40d8aa9

Please sign in to comment.