Merge branch 'next' into for-linus
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 4 Jun 2018 20:33:12 +0000 (13:33 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 4 Jun 2018 20:33:12 +0000 (13:33 -0700)
Prepare input updates for 4.18 merge window.

drivers/input/mouse/elan_i2c_smbus.c
drivers/input/mouse/synaptics.c

index 29f99529b1876a9c995dfa16e0430ad8ca4706cb..cfcb32559925baf1acf070f908f3b91b1fc1b905 100644 (file)
@@ -130,7 +130,7 @@ static int elan_smbus_get_baseline_data(struct i2c_client *client,
                                        bool max_baseline, u8 *value)
 {
        int error;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        error = i2c_smbus_read_block_data(client,
                                          max_baseline ?
@@ -149,7 +149,7 @@ static int elan_smbus_get_version(struct i2c_client *client,
                                  bool iap, u8 *version)
 {
        int error;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        error = i2c_smbus_read_block_data(client,
                                          iap ? ETP_SMBUS_IAP_VERSION_CMD :
@@ -170,7 +170,7 @@ static int elan_smbus_get_sm_version(struct i2c_client *client,
                                     u8 *clickpad)
 {
        int error;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        error = i2c_smbus_read_block_data(client,
                                          ETP_SMBUS_SM_VERSION_CMD, val);
@@ -188,7 +188,7 @@ static int elan_smbus_get_sm_version(struct i2c_client *client,
 static int elan_smbus_get_product_id(struct i2c_client *client, u16 *id)
 {
        int error;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        error = i2c_smbus_read_block_data(client,
                                          ETP_SMBUS_UNIQUEID_CMD, val);
@@ -205,7 +205,7 @@ static int elan_smbus_get_checksum(struct i2c_client *client,
                                   bool iap, u16 *csum)
 {
        int error;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        error = i2c_smbus_read_block_data(client,
                                          iap ? ETP_SMBUS_FW_CHECKSUM_CMD :
@@ -226,7 +226,7 @@ static int elan_smbus_get_max(struct i2c_client *client,
 {
        int ret;
        int error;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        ret = i2c_smbus_read_block_data(client, ETP_SMBUS_RANGE_CMD, val);
        if (ret != 3) {
@@ -246,7 +246,7 @@ static int elan_smbus_get_resolution(struct i2c_client *client,
 {
        int ret;
        int error;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        ret = i2c_smbus_read_block_data(client, ETP_SMBUS_RESOLUTION_CMD, val);
        if (ret != 3) {
@@ -267,7 +267,7 @@ static int elan_smbus_get_num_traces(struct i2c_client *client,
 {
        int ret;
        int error;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        ret = i2c_smbus_read_block_data(client, ETP_SMBUS_XY_TRACENUM_CMD, val);
        if (ret != 3) {
@@ -294,7 +294,7 @@ static int elan_smbus_iap_get_mode(struct i2c_client *client,
 {
        int error;
        u16 constant;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        error = i2c_smbus_read_block_data(client, ETP_SMBUS_IAP_CTRL_CMD, val);
        if (error < 0) {
@@ -345,7 +345,7 @@ static int elan_smbus_prepare_fw_update(struct i2c_client *client)
        int len;
        int error;
        enum tp_mode mode;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
        u8 cmd[4] = {0x0F, 0x78, 0x00, 0x06};
        u16 password;
 
@@ -419,7 +419,7 @@ static int elan_smbus_write_fw_block(struct i2c_client *client,
        struct device *dev = &client->dev;
        int error;
        u16 result;
-       u8 val[3];
+       u8 val[I2C_SMBUS_BLOCK_MAX] = {0};
 
        /*
         * Due to the limitation of smbus protocol limiting
index e3e0ef585eb677797aed429f1dc49a546a2eff31..55d33500d55ec4ffb71ebc31c9a3e604cf00ea06 100644 (file)
@@ -172,6 +172,12 @@ static const char * const smbus_pnp_ids[] = {
        "LEN0048", /* X1 Carbon 3 */
        "LEN0046", /* X250 */
        "LEN004a", /* W541 */
+       "LEN0071", /* T480 */
+       "LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
+       "LEN0073", /* X1 Carbon G5 (Elantech) */
+       "LEN0092", /* X1 Carbon 6 */
+       "LEN0096", /* X280 */
+       "LEN0097", /* X280 -> ALPS trackpoint */
        "LEN200f", /* T450s */
        NULL
 };