提交 1e648a13 编写于 作者: B Benjamin Tissoires 提交者: Jiri Kosina

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: NBenjamin Tissoires <benjamin.tissoires@enac.fr>
Reviewed-by: NStéphane Chatty <chatty@enac.fr>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 a841b62c
......@@ -235,9 +235,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
case HID_DG_HEIGHT:
hid_map_usage(hi, usage, bit, max,
EV_ABS, ABS_MT_TOUCH_MINOR);
field->logical_maximum = 1;
field->logical_minimum = 0;
set_abs(hi->input, ABS_MT_ORIENTATION, field, 0);
input_set_abs_params(hi->input,
ABS_MT_ORIENTATION, 0, 1, 0, 0);
td->last_slot_field = usage->hid;
return 1;
case HID_DG_TIPPRESSURE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册