diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-07-20 14:56:54 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-07-20 17:35:31 -0700 |
commit | 3d712af637e19a1c139c2b586c08b2a56bdff8c8 (patch) | |
tree | c078780114e32202d16aa3aa066b91a7f6e84bfc /drivers/input/mouse/elan_i2c_smbus.c | |
parent | 8d73ec7411e084de8266bc3cb031d85a222458be (diff) | |
download | linux-3d712af637e19a1c139c2b586c08b2a56bdff8c8.tar.bz2 |
Input: elan_i2c - do not constantly re-query pattern ID
We do not need to constantly re-query pattern ID, we can instead query it
once and then pass to methods that need it.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/elan_i2c_smbus.c')
-rw-r--r-- | drivers/input/mouse/elan_i2c_smbus.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c index 97c2c46be5f6..f7af8b7b345f 100644 --- a/drivers/input/mouse/elan_i2c_smbus.c +++ b/drivers/input/mouse/elan_i2c_smbus.c @@ -147,7 +147,7 @@ static int elan_smbus_get_baseline_data(struct i2c_client *client, } static int elan_smbus_get_version(struct i2c_client *client, - bool iap, u8 *version) + u8 pattern, bool iap, u8 *version) { int error; u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; @@ -166,9 +166,8 @@ static int elan_smbus_get_version(struct i2c_client *client, return 0; } -static int elan_smbus_get_sm_version(struct i2c_client *client, - u16 *ic_type, u8 *version, - u8 *clickpad) +static int elan_smbus_get_sm_version(struct i2c_client *client, u8 pattern, + u16 *ic_type, u8 *version, u8 *clickpad) { int error; u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |