Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: fix possible deadlock in hidraw_read
HID: fix kerneldoc comment for hid_input_report()
HID: add __init/__exit macros to twinhan.c

+5 -6
+1 -1
drivers/hid/hid-core.c
··· 1066 1066 * @type: HID report type (HID_*_REPORT) 1067 1067 * @data: report contents 1068 1068 * @size: size of data parameter 1069 - * @interrupt: called from atomic? 1069 + * @interrupt: distinguish between interrupt and control transfers 1070 1070 * 1071 1071 * This is data entry for lower layers. 1072 1072 */
+2 -2
drivers/hid/hid-twinhan.c
··· 132 132 .input_mapping = twinhan_input_mapping, 133 133 }; 134 134 135 - static int twinhan_init(void) 135 + static int __init twinhan_init(void) 136 136 { 137 137 return hid_register_driver(&twinhan_driver); 138 138 } 139 139 140 - static void twinhan_exit(void) 140 + static void __exit twinhan_exit(void) 141 141 { 142 142 hid_unregister_driver(&twinhan_driver); 143 143 }
+2 -3
drivers/hid/hidraw.c
··· 48 48 char *report; 49 49 DECLARE_WAITQUEUE(wait, current); 50 50 51 + mutex_lock(&list->read_mutex); 52 + 51 53 while (ret == 0) { 52 - 53 - mutex_lock(&list->read_mutex); 54 - 55 54 if (list->head == list->tail) { 56 55 add_wait_queue(&list->hidraw->wait, &wait); 57 56 set_current_state(TASK_INTERRUPTIBLE);