diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/input/mouse/elan_i2c_smbus.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c index 29f99529b187..cfcb32559925 100644 --- a/drivers/input/mouse/elan_i2c_smbus.c +++ b/drivers/input/mouse/elan_i2c_smbus.c | |||
| @@ -130,7 +130,7 @@ static int elan_smbus_get_baseline_data(struct i2c_client *client, | |||
| 130 | bool max_baseline, u8 *value) | 130 | bool max_baseline, u8 *value) |
| 131 | { | 131 | { |
| 132 | int error; | 132 | int error; |
| 133 | u8 val[3]; | 133 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 134 | 134 | ||
| 135 | error = i2c_smbus_read_block_data(client, | 135 | error = i2c_smbus_read_block_data(client, |
| 136 | max_baseline ? | 136 | max_baseline ? |
| @@ -149,7 +149,7 @@ static int elan_smbus_get_version(struct i2c_client *client, | |||
| 149 | bool iap, u8 *version) | 149 | bool iap, u8 *version) |
| 150 | { | 150 | { |
| 151 | int error; | 151 | int error; |
| 152 | u8 val[3]; | 152 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 153 | 153 | ||
| 154 | error = i2c_smbus_read_block_data(client, | 154 | error = i2c_smbus_read_block_data(client, |
| 155 | iap ? ETP_SMBUS_IAP_VERSION_CMD : | 155 | iap ? ETP_SMBUS_IAP_VERSION_CMD : |
| @@ -170,7 +170,7 @@ static int elan_smbus_get_sm_version(struct i2c_client *client, | |||
| 170 | u8 *clickpad) | 170 | u8 *clickpad) |
| 171 | { | 171 | { |
| 172 | int error; | 172 | int error; |
| 173 | u8 val[3]; | 173 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 174 | 174 | ||
| 175 | error = i2c_smbus_read_block_data(client, | 175 | error = i2c_smbus_read_block_data(client, |
| 176 | ETP_SMBUS_SM_VERSION_CMD, val); | 176 | ETP_SMBUS_SM_VERSION_CMD, val); |
| @@ -188,7 +188,7 @@ static int elan_smbus_get_sm_version(struct i2c_client *client, | |||
| 188 | static int elan_smbus_get_product_id(struct i2c_client *client, u16 *id) | 188 | static int elan_smbus_get_product_id(struct i2c_client *client, u16 *id) |
| 189 | { | 189 | { |
| 190 | int error; | 190 | int error; |
| 191 | u8 val[3]; | 191 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 192 | 192 | ||
| 193 | error = i2c_smbus_read_block_data(client, | 193 | error = i2c_smbus_read_block_data(client, |
| 194 | ETP_SMBUS_UNIQUEID_CMD, val); | 194 | ETP_SMBUS_UNIQUEID_CMD, val); |
| @@ -205,7 +205,7 @@ static int elan_smbus_get_checksum(struct i2c_client *client, | |||
| 205 | bool iap, u16 *csum) | 205 | bool iap, u16 *csum) |
| 206 | { | 206 | { |
| 207 | int error; | 207 | int error; |
| 208 | u8 val[3]; | 208 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 209 | 209 | ||
| 210 | error = i2c_smbus_read_block_data(client, | 210 | error = i2c_smbus_read_block_data(client, |
| 211 | iap ? ETP_SMBUS_FW_CHECKSUM_CMD : | 211 | iap ? ETP_SMBUS_FW_CHECKSUM_CMD : |
| @@ -226,7 +226,7 @@ static int elan_smbus_get_max(struct i2c_client *client, | |||
| 226 | { | 226 | { |
| 227 | int ret; | 227 | int ret; |
| 228 | int error; | 228 | int error; |
| 229 | u8 val[3]; | 229 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 230 | 230 | ||
| 231 | ret = i2c_smbus_read_block_data(client, ETP_SMBUS_RANGE_CMD, val); | 231 | ret = i2c_smbus_read_block_data(client, ETP_SMBUS_RANGE_CMD, val); |
| 232 | if (ret != 3) { | 232 | if (ret != 3) { |
| @@ -246,7 +246,7 @@ static int elan_smbus_get_resolution(struct i2c_client *client, | |||
| 246 | { | 246 | { |
| 247 | int ret; | 247 | int ret; |
| 248 | int error; | 248 | int error; |
| 249 | u8 val[3]; | 249 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 250 | 250 | ||
| 251 | ret = i2c_smbus_read_block_data(client, ETP_SMBUS_RESOLUTION_CMD, val); | 251 | ret = i2c_smbus_read_block_data(client, ETP_SMBUS_RESOLUTION_CMD, val); |
| 252 | if (ret != 3) { | 252 | if (ret != 3) { |
| @@ -267,7 +267,7 @@ static int elan_smbus_get_num_traces(struct i2c_client *client, | |||
| 267 | { | 267 | { |
| 268 | int ret; | 268 | int ret; |
| 269 | int error; | 269 | int error; |
| 270 | u8 val[3]; | 270 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 271 | 271 | ||
| 272 | ret = i2c_smbus_read_block_data(client, ETP_SMBUS_XY_TRACENUM_CMD, val); | 272 | ret = i2c_smbus_read_block_data(client, ETP_SMBUS_XY_TRACENUM_CMD, val); |
| 273 | if (ret != 3) { | 273 | if (ret != 3) { |
| @@ -294,7 +294,7 @@ static int elan_smbus_iap_get_mode(struct i2c_client *client, | |||
| 294 | { | 294 | { |
| 295 | int error; | 295 | int error; |
| 296 | u16 constant; | 296 | u16 constant; |
| 297 | u8 val[3]; | 297 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 298 | 298 | ||
| 299 | error = i2c_smbus_read_block_data(client, ETP_SMBUS_IAP_CTRL_CMD, val); | 299 | error = i2c_smbus_read_block_data(client, ETP_SMBUS_IAP_CTRL_CMD, val); |
| 300 | if (error < 0) { | 300 | if (error < 0) { |
| @@ -345,7 +345,7 @@ static int elan_smbus_prepare_fw_update(struct i2c_client *client) | |||
| 345 | int len; | 345 | int len; |
| 346 | int error; | 346 | int error; |
| 347 | enum tp_mode mode; | 347 | enum tp_mode mode; |
| 348 | u8 val[3]; | 348 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 349 | u8 cmd[4] = {0x0F, 0x78, 0x00, 0x06}; | 349 | u8 cmd[4] = {0x0F, 0x78, 0x00, 0x06}; |
| 350 | u16 password; | 350 | u16 password; |
| 351 | 351 | ||
| @@ -419,7 +419,7 @@ static int elan_smbus_write_fw_block(struct i2c_client *client, | |||
| 419 | struct device *dev = &client->dev; | 419 | struct device *dev = &client->dev; |
| 420 | int error; | 420 | int error; |
| 421 | u16 result; | 421 | u16 result; |
| 422 | u8 val[3]; | 422 | u8 val[I2C_SMBUS_BLOCK_MAX] = {0}; |
| 423 | 423 | ||
| 424 | /* | 424 | /* |
| 425 | * Due to the limitation of smbus protocol limiting | 425 | * Due to the limitation of smbus protocol limiting |
