diff options
-rw-r--r-- | drivers/hid/hid-multitouch.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index a20fc604ffd8..60e85f3861ee 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -1150,8 +1150,30 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
1150 | } | 1150 | } |
1151 | 1151 | ||
1152 | #ifdef CONFIG_PM | 1152 | #ifdef CONFIG_PM |
1153 | static void mt_release_contacts(struct hid_device *hid) | ||
1154 | { | ||
1155 | struct hid_input *hidinput; | ||
1156 | |||
1157 | list_for_each_entry(hidinput, &hid->inputs, list) { | ||
1158 | struct input_dev *input_dev = hidinput->input; | ||
1159 | struct input_mt *mt = input_dev->mt; | ||
1160 | int i; | ||
1161 | |||
1162 | if (mt) { | ||
1163 | for (i = 0; i < mt->num_slots; i++) { | ||
1164 | input_mt_slot(input_dev, i); | ||
1165 | input_mt_report_slot_state(input_dev, | ||
1166 | MT_TOOL_FINGER, | ||
1167 | false); | ||
1168 | } | ||
1169 | input_sync(input_dev); | ||
1170 | } | ||
1171 | } | ||
1172 | } | ||
1173 | |||
1153 | static int mt_reset_resume(struct hid_device *hdev) | 1174 | static int mt_reset_resume(struct hid_device *hdev) |
1154 | { | 1175 | { |
1176 | mt_release_contacts(hdev); | ||
1155 | mt_set_maxcontacts(hdev); | 1177 | mt_set_maxcontacts(hdev); |
1156 | mt_set_input_mode(hdev); | 1178 | mt_set_input_mode(hdev); |
1157 | return 0; | 1179 | return 0; |