diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2021-03-29 07:57:48 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-03-29 08:00:17 +0200 |
commit | 56cfe6f820a6315291eb5a1b82bb49633b993d3b (patch) | |
tree | 90356e8568bd8a7294f3e5429c95fee3995f8e4a | |
parent | Input: elants_i2c - fix division by zero if firmware reports zero phys size (diff) | |
download | linux-56cfe6f820a6315291eb5a1b82bb49633b993d3b.tar.xz linux-56cfe6f820a6315291eb5a1b82bb49633b993d3b.zip |
Input: elants_i2c - drop zero-checking of ABS_MT_TOUCH_MAJOR resolution
Drop unnecessary zero-checking of ABS_MT_TOUCH_MAJOR resolution since
there is no difference between setting resolution to 0 vs not setting
it at all. This change makes code cleaner a tad.
Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210328235507.19240-1-digetx@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/touchscreen/elants_i2c.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index 78172c31529a..5f7706febcb0 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -1449,8 +1449,7 @@ static int elants_i2c_probe(struct i2c_client *client, input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res); input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res); - if (ts->major_res > 0) - input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res); + input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res); error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM, INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED); |