Skip to contentSkip to conversation

Input: elants_i2c - drop zero-checking of ABS_MT_TOUCH_MAJOR resolution

PATCH Applied Dmitry Osipenko 2 participants 2 messages Mar 28, 2021 – Mar 29, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/input/touchscreen/elants_i2c.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/input/touchscreen/elants_i2c.c +1 -2
index 4c2b579f6c8b..7ddc24471819 100644
@@ -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);
Signature · 1 line
2.30.2