diff options
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f0b00ec1e47e..e03c67dd3e63 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -44,8 +44,8 @@ | |||
44 | 44 | ||
45 | #ifdef CONFIG_HID_DEBUG | 45 | #ifdef CONFIG_HID_DEBUG |
46 | int hid_debug = 0; | 46 | int hid_debug = 0; |
47 | module_param_named(debug, hid_debug, bool, 0600); | 47 | module_param_named(debug, hid_debug, int, 0600); |
48 | MODULE_PARM_DESC(debug, "Turn HID debugging mode on and off"); | 48 | MODULE_PARM_DESC(debug, "HID debugging (0=off, 1=probing info, 2=continuous data dumping)"); |
49 | EXPORT_SYMBOL_GPL(hid_debug); | 49 | EXPORT_SYMBOL_GPL(hid_debug); |
50 | #endif | 50 | #endif |
51 | 51 | ||
@@ -97,7 +97,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned | |||
97 | field->index = report->maxfield++; | 97 | field->index = report->maxfield++; |
98 | report->field[field->index] = field; | 98 | report->field[field->index] = field; |
99 | field->usage = (struct hid_usage *)(field + 1); | 99 | field->usage = (struct hid_usage *)(field + 1); |
100 | field->value = (unsigned *)(field->usage + usages); | 100 | field->value = (s32 *)(field->usage + usages); |
101 | field->report = report; | 101 | field->report = report; |
102 | 102 | ||
103 | return field; | 103 | return field; |
@@ -830,7 +830,8 @@ static void hid_process_event(struct hid_device *hid, struct hid_field *field, s | |||
830 | * reporting to the layer). | 830 | * reporting to the layer). |
831 | */ | 831 | */ |
832 | 832 | ||
833 | void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt) | 833 | static void hid_input_field(struct hid_device *hid, struct hid_field *field, |
834 | __u8 *data, int interrupt) | ||
834 | { | 835 | { |
835 | unsigned n; | 836 | unsigned n; |
836 | unsigned count = field->report_count; | 837 | unsigned count = field->report_count; |
@@ -876,7 +877,6 @@ void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data | |||
876 | exit: | 877 | exit: |
877 | kfree(value); | 878 | kfree(value); |
878 | } | 879 | } |
879 | EXPORT_SYMBOL_GPL(hid_input_field); | ||
880 | 880 | ||
881 | /* | 881 | /* |
882 | * Output the field into the report. | 882 | * Output the field into the report. |
@@ -988,8 +988,13 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i | |||
988 | 988 | ||
989 | if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) | 989 | if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) |
990 | hid->hiddev_report_event(hid, report); | 990 | hid->hiddev_report_event(hid, report); |
991 | if (hid->claimed & HID_CLAIMED_HIDRAW) | 991 | if (hid->claimed & HID_CLAIMED_HIDRAW) { |
992 | hidraw_report_event(hid, data, size); | 992 | /* numbered reports need to be passed with the report num */ |
993 | if (report_enum->numbered) | ||
994 | hidraw_report_event(hid, data - 1, size + 1); | ||
995 | else | ||
996 | hidraw_report_event(hid, data, size); | ||
997 | } | ||
993 | 998 | ||
994 | for (n = 0; n < report->maxfield; n++) | 999 | for (n = 0; n < report->maxfield; n++) |
995 | hid_input_field(hid, report->field[n], data, interrupt); | 1000 | hid_input_field(hid, report->field[n], data, interrupt); |