Skip to content

Commit 1e648a1

Browse files
Benjamin TissoiresJiri Kosina
authored andcommitted
HID: hid-multitouch: refactor initialization of ABS_MT_ORIENTATION
The way the input_set_abs_params was called for the new composite field ABS_MT_ORIENTATION was not very clear at second reading. We can remove the non-necessary call to set_abs and use the simple call to input_set_abs_params. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> Reviewed-by: Stéphane Chatty <chatty@enac.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent a841b62 commit 1e648a1

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/hid/hid-multitouch.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
235235
case HID_DG_HEIGHT:
236236
hid_map_usage(hi, usage, bit, max,
237237
EV_ABS, ABS_MT_TOUCH_MINOR);
238-
field->logical_maximum = 1;
239-
field->logical_minimum = 0;
240-
set_abs(hi->input, ABS_MT_ORIENTATION, field, 0);
238+
input_set_abs_params(hi->input,
239+
ABS_MT_ORIENTATION, 0, 1, 0, 0);
241240
td->last_slot_field = usage->hid;
242241
return 1;
243242
case HID_DG_TIPPRESSURE:

0 commit comments

Comments
 (0)