diff options
author | Benjamin Tissoires <benjamin.tissoires@enac.fr> | 2011-03-18 09:27:55 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-03-21 12:07:29 -0400 |
commit | 1e648a13720ef5de51f132501acf3e443d1a36d4 (patch) | |
tree | a508e943c9d001b58f146640f1787b492d93a386 /drivers/hid | |
parent | a841b62c5d5f75ce3676fde755696d30cc8de99a (diff) |
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-multitouch.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index e6e1ea251490..d31301e85c56 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -235,9 +235,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
235 | case HID_DG_HEIGHT: | 235 | case HID_DG_HEIGHT: |
236 | hid_map_usage(hi, usage, bit, max, | 236 | hid_map_usage(hi, usage, bit, max, |
237 | EV_ABS, ABS_MT_TOUCH_MINOR); | 237 | EV_ABS, ABS_MT_TOUCH_MINOR); |
238 | field->logical_maximum = 1; | 238 | input_set_abs_params(hi->input, |
239 | field->logical_minimum = 0; | 239 | ABS_MT_ORIENTATION, 0, 1, 0, 0); |
240 | set_abs(hi->input, ABS_MT_ORIENTATION, field, 0); | ||
241 | td->last_slot_field = usage->hid; | 240 | td->last_slot_field = usage->hid; |
242 | return 1; | 241 | return 1; |
243 | case HID_DG_TIPPRESSURE: | 242 | case HID_DG_TIPPRESSURE: |