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>
This commit is contained in:

committed by
Dmitry Torokhov

parent
c84333a1c5
commit
ed75a14eb5
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user