Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dmitry Osipenko and committed by
Dmitry Torokhov
56cfe6f8 781bab32

+1 -2
+1 -2
drivers/input/touchscreen/elants_i2c.c
··· 1449 1449 1450 1450 input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res); 1451 1451 input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res); 1452 - if (ts->major_res > 0) 1453 - input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res); 1452 + input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, ts->major_res); 1454 1453 1455 1454 error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM, 1456 1455 INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);