Skip to content

Commit 56cfe6f

Browse files
digetxdtor
authored andcommitted
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 <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 781bab3 commit 56cfe6f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/input/touchscreen/elants_i2c.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,8 +1449,7 @@ static int elants_i2c_probe(struct i2c_client *client,
14491449

14501450
input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
14511451
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);
14541453

14551454
error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM,
14561455
INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);

0 commit comments

Comments
 (0)