Root/
1 | /* |
2 | * HID driver for Elecom BM084 (bluetooth mouse). |
3 | * Removes a non-existing horizontal wheel from |
4 | * the HID descriptor. |
5 | * (This module is based on "hid-ortek".) |
6 | * |
7 | * Copyright (c) 2010 Richard Nauber <Richard.Nauber@gmail.com> |
8 | */ |
9 | |
10 | /* |
11 | * This program is free software; you can redistribute it and/or modify it |
12 | * under the terms of the GNU General Public License as published by the Free |
13 | * Software Foundation; either version 2 of the License, or (at your option) |
14 | * any later version. |
15 | */ |
16 | |
17 | #include <linux/device.h> |
18 | #include <linux/hid.h> |
19 | #include <linux/module.h> |
20 | |
21 | #include "hid-ids.h" |
22 | |
23 | static __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc, |
24 | unsigned int *rsize) |
25 | { |
26 | if (*rsize >= 48 && rdesc[46] == 0x05 && rdesc[47] == 0x0c) { |
27 | hid_info(hdev, "Fixing up Elecom BM084 report descriptor\n"); |
28 | rdesc[47] = 0x00; |
29 | } |
30 | return rdesc; |
31 | } |
32 | |
33 | static const struct hid_device_id elecom_devices[] = { |
34 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084)}, |
35 | { } |
36 | }; |
37 | MODULE_DEVICE_TABLE(hid, elecom_devices); |
38 | |
39 | static struct hid_driver elecom_driver = { |
40 | .name = "elecom", |
41 | .id_table = elecom_devices, |
42 | .report_fixup = elecom_report_fixup |
43 | }; |
44 | |
45 | static int __init elecom_init(void) |
46 | { |
47 | return hid_register_driver(&elecom_driver); |
48 | } |
49 | |
50 | static void __exit elecom_exit(void) |
51 | { |
52 | hid_unregister_driver(&elecom_driver); |
53 | } |
54 | |
55 | module_init(elecom_init); |
56 | module_exit(elecom_exit); |
57 | MODULE_LICENSE("GPL"); |
58 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9