GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / hid / hid-elecom.c
blob7a40878f46b4920d23619d4ee1fc3ea7c691c235
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".)
7 * Copyright (c) 2010 Richard Nauber <Richard.Nauber@gmail.com>
8 */
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.
17 #include <linux/device.h>
18 #include <linux/hid.h>
19 #include <linux/module.h>
21 #include "hid-ids.h"
23 static void elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,
24 unsigned int rsize)
26 if (rsize >= 48 && rdesc[46] == 0x05 && rdesc[47] == 0x0c) {
27 dev_info(&hdev->dev, "Fixing up Elecom BM084 "
28 "report descriptor.\n");
29 rdesc[47] = 0x00;
33 static const struct hid_device_id elecom_devices[] = {
34 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084)},
35 { }
37 MODULE_DEVICE_TABLE(hid, elecom_devices);
39 static struct hid_driver elecom_driver = {
40 .name = "elecom",
41 .id_table = elecom_devices,
42 .report_fixup = elecom_report_fixup
45 static int __init elecom_init(void)
47 return hid_register_driver(&elecom_driver);
50 static void __exit elecom_exit(void)
52 hid_unregister_driver(&elecom_driver);
55 module_init(elecom_init);
56 module_exit(elecom_exit);
57 MODULE_LICENSE("GPL");