Skip to content

Commit

Permalink
Input: elants_i2c - drop zero-checking of ABS_MT_TOUCH_MAJOR resolution
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Osipenko authored and Dmitry Torokhov committed Mar 29, 2021
1 parent 781bab3 commit 56cfe6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/input/touchscreen/elants_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 56cfe6f

Please sign in to comment.