diff options
Diffstat (limited to 'drivers/input/tablet/wacom_wac.c')
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index fb6678e21e5f..f1430d825e43 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -928,12 +928,12 @@ static int wacom_24hdt_irq(struct wacom_wac *wacom) | |||
928 | input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); | 928 | input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); |
929 | 929 | ||
930 | if (touch) { | 930 | if (touch) { |
931 | int t_x = le16_to_cpup((__le16 *)&data[offset + 2]); | 931 | int t_x = get_unaligned_le16(&data[offset + 2]); |
932 | int c_x = le16_to_cpup((__le16 *)&data[offset + 4]); | 932 | int c_x = get_unaligned_le16(&data[offset + 4]); |
933 | int t_y = le16_to_cpup((__le16 *)&data[offset + 6]); | 933 | int t_y = get_unaligned_le16(&data[offset + 6]); |
934 | int c_y = le16_to_cpup((__le16 *)&data[offset + 8]); | 934 | int c_y = get_unaligned_le16(&data[offset + 8]); |
935 | int w = le16_to_cpup((__le16 *)&data[offset + 10]); | 935 | int w = get_unaligned_le16(&data[offset + 10]); |
936 | int h = le16_to_cpup((__le16 *)&data[offset + 12]); | 936 | int h = get_unaligned_le16(&data[offset + 12]); |
937 | 937 | ||
938 | input_report_abs(input, ABS_MT_POSITION_X, t_x); | 938 | input_report_abs(input, ABS_MT_POSITION_X, t_x); |
939 | input_report_abs(input, ABS_MT_POSITION_Y, t_y); | 939 | input_report_abs(input, ABS_MT_POSITION_Y, t_y); |
@@ -978,7 +978,7 @@ static int wacom_mt_touch(struct wacom_wac *wacom) | |||
978 | for (i = 0; i < contacts_to_send; i++) { | 978 | for (i = 0; i < contacts_to_send; i++) { |
979 | int offset = (WACOM_BYTES_PER_MT_PACKET + x_offset) * i + 3; | 979 | int offset = (WACOM_BYTES_PER_MT_PACKET + x_offset) * i + 3; |
980 | bool touch = data[offset] & 0x1; | 980 | bool touch = data[offset] & 0x1; |
981 | int id = le16_to_cpup((__le16 *)&data[offset + 1]); | 981 | int id = get_unaligned_le16(&data[offset + 1]); |
982 | int slot = input_mt_get_slot_by_key(input, id); | 982 | int slot = input_mt_get_slot_by_key(input, id); |
983 | 983 | ||
984 | if (slot < 0) | 984 | if (slot < 0) |
@@ -987,8 +987,8 @@ static int wacom_mt_touch(struct wacom_wac *wacom) | |||
987 | input_mt_slot(input, slot); | 987 | input_mt_slot(input, slot); |
988 | input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); | 988 | input_mt_report_slot_state(input, MT_TOOL_FINGER, touch); |
989 | if (touch) { | 989 | if (touch) { |
990 | int x = le16_to_cpup((__le16 *)&data[offset + x_offset + 7]); | 990 | int x = get_unaligned_le16(&data[offset + x_offset + 7]); |
991 | int y = le16_to_cpup((__le16 *)&data[offset + x_offset + 9]); | 991 | int y = get_unaligned_le16(&data[offset + x_offset + 9]); |
992 | input_report_abs(input, ABS_MT_POSITION_X, x); | 992 | input_report_abs(input, ABS_MT_POSITION_X, x); |
993 | input_report_abs(input, ABS_MT_POSITION_Y, y); | 993 | input_report_abs(input, ABS_MT_POSITION_Y, y); |
994 | } | 994 | } |