diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-01-08 01:08:19 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-01-08 01:08:19 +0100 |
commit | a7153258b70ccbe3922fcee9ca4271d4f4c2bc55 (patch) | |
tree | 12e17027af36846933908da64a1419491ea58676 /drivers/hid/hid-mosart.c | |
parent | ae5e49c79c051ea1d5ca91cbd4a0d22189067ba3 (diff) | |
parent | 0fbf8ed976af5bb43cf9cf2492161eb9688fee0c (diff) | |
download | linux-stable-a7153258b70ccbe3922fcee9ca4271d4f4c2bc55.tar.gz linux-stable-a7153258b70ccbe3922fcee9ca4271d4f4c2bc55.tar.bz2 linux-stable-a7153258b70ccbe3922fcee9ca4271d4f4c2bc55.zip |
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, case 0xff000000: /* ignore HID features */ return -1; + + case HID_UP_BUTTON: + /* ignore buttons */ + return -1; } return 0; @@ -230,6 +234,19 @@ static int mosart_probe(struct hid_device *hdev, const struct hid_device_id *id) return ret; } +#ifdef CONFIG_PM +static int mosart_reset_resume(struct hid_device *hdev) +{ + struct hid_report_enum *re = hdev->report_enum + + HID_FEATURE_REPORT; + struct hid_report *r = re->report_id_hash[7]; + + r->field[0]->value[0] = 0x02; + usbhid_submit_report(hdev, r, USB_DIR_OUT); + return 0; +} +#endif + static void mosart_remove(struct hid_device *hdev) { hid_hw_stop(hdev); @@ -258,6 +275,9 @@ static struct hid_driver mosart_driver = { .input_mapped = mosart_input_mapped, .usage_table = mosart_grabbed_usages, .event = mosart_event, +#ifdef CONFIG_PM + .reset_resume = mosart_reset_resume, +#endif }; static int __init mosart_init(void) |