Skip to content

Commit 40d8aa9

Browse files
jinglewudtor
authored andcommitted
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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent fc7c882 commit 40d8aa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/input/mouse/elan_i2c_i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static int elan_i2c_get_version(struct i2c_client *client,
284284
return error;
285285
}
286286

287-
if (pattern_ver == 0x01)
287+
if (pattern_ver >= 0x01)
288288
*version = iap ? val[1] : val[0];
289289
else
290290
*version = val[0];
@@ -305,7 +305,7 @@ static int elan_i2c_get_sm_version(struct i2c_client *client,
305305
return error;
306306
}
307307

308-
if (pattern_ver == 0x01) {
308+
if (pattern_ver >= 0x01) {
309309
error = elan_i2c_read_cmd(client, ETP_I2C_IC_TYPE_CMD, val);
310310
if (error) {
311311
dev_err(&client->dev, "failed to get ic type: %d\n",

0 commit comments

Comments
 (0)