diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-01-07 19:08:19 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-01-07 19:08:19 -0500 |
commit | a7153258b70ccbe3922fcee9ca4271d4f4c2bc55 (patch) | |
tree | 12e17027af36846933908da64a1419491ea58676 /drivers/hid/hid-mosart.c | |
parent | ae5e49c79c051ea1d5ca91cbd4a0d22189067ba3 (diff) | |
parent | 0fbf8ed976af5bb43cf9cf2492161eb9688fee0c (diff) |
Merge branches 'upstream' and 'upstream-fixes' into for-linus
Diffstat (limited to 'drivers/hid/hid-mosart.c')
-rw-r--r-- | drivers/hid/hid-mosart.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/hid/hid-mosart.c b/drivers/hid/hid-mosart.c index 0668685380d5..9fb050ce6f04 100644 --- a/drivers/hid/hid-mosart.c +++ b/drivers/hid/hid-mosart.c | |||
@@ -90,6 +90,10 @@ static int mosart_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
90 | case 0xff000000: | 90 | case 0xff000000: |
91 | /* ignore HID features */ | 91 | /* ignore HID features */ |
92 | return -1; | 92 | return -1; |
93 | |||
94 | case HID_UP_BUTTON: | ||
95 | /* ignore buttons */ | ||
96 | return -1; | ||
93 | } | 97 | } |
94 | 98 | ||
95 | return 0; | 99 | return 0; |
@@ -230,6 +234,19 @@ static int mosart_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
230 | return ret; | 234 | return ret; |
231 | } | 235 | } |
232 | 236 | ||
237 | #ifdef CONFIG_PM | ||
238 | static int mosart_reset_resume(struct hid_device *hdev) | ||
239 | { | ||
240 | struct hid_report_enum *re = hdev->report_enum | ||
241 | + HID_FEATURE_REPORT; | ||
242 | struct hid_report *r = re->report_id_hash[7]; | ||
243 | |||
244 | r->field[0]->value[0] = 0x02; | ||
245 | usbhid_submit_report(hdev, r, USB_DIR_OUT); | ||
246 | return 0; | ||
247 | } | ||
248 | #endif | ||
249 | |||
233 | static void mosart_remove(struct hid_device *hdev) | 250 | static void mosart_remove(struct hid_device *hdev) |
234 | { | 251 | { |
235 | hid_hw_stop(hdev); | 252 | hid_hw_stop(hdev); |
@@ -258,6 +275,9 @@ static struct hid_driver mosart_driver = { | |||
258 | .input_mapped = mosart_input_mapped, | 275 | .input_mapped = mosart_input_mapped, |
259 | .usage_table = mosart_grabbed_usages, | 276 | .usage_table = mosart_grabbed_usages, |
260 | .event = mosart_event, | 277 | .event = mosart_event, |
278 | #ifdef CONFIG_PM | ||
279 | .reset_resume = mosart_reset_resume, | ||
280 | #endif | ||
261 | }; | 281 | }; |
262 | 282 | ||
263 | static int __init mosart_init(void) | 283 | static int __init mosart_init(void) |