aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/elan_i2c_i2c.c
diff options
context:
space:
mode:
authorDuson Lin <dusonlin@emc.com.tw>2015-09-21 09:26:46 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-09-21 09:32:40 -0700
commited75a14eb554995c522a3b861d4c86a7eddb2ad7 (patch)
treef65ff6a2ca54abc6fa22a212f1631f234fc1e30a /drivers/input/mouse/elan_i2c_i2c.c
parentInput: elan_i2c - add ic type 0x03 (diff)
downloadlinux-dev-ed75a14eb554995c522a3b861d4c86a7eddb2ad7.tar.xz
linux-dev-ed75a14eb554995c522a3b861d4c86a7eddb2ad7.zip
Input: elan_i2c - expand maximum product_id form 0xFF to 0xFFFF
In order to support more projects in the future, we expand the maximum product_id value form 0xFF to 0xFFFF. Signed-off by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/elan_i2c_i2c.c')
-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 683c840c9dd7..a679e56c44cd 100644
--- a/drivers/input/mouse/elan_i2c_i2c.c
+++ b/drivers/input/mouse/elan_i2c_i2c.c
@@ -276,7 +276,7 @@ static int elan_i2c_get_sm_version(struct i2c_client *client,
return 0;
}
-static int elan_i2c_get_product_id(struct i2c_client *client, u8 *id)
+static int elan_i2c_get_product_id(struct i2c_client *client, u16 *id)
{
int error;
u8 val[3];
@@ -287,7 +287,7 @@ static int elan_i2c_get_product_id(struct i2c_client *client, u8 *id)
return error;
}
- *id = val[0];
+ *id = le16_to_cpup((__le16 *)val);
return 0;
}