diff options
-rw-r--r-- | drivers/hid/hid-core.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-twinhan.c | 4 | ||||
-rw-r--r-- | drivers/hid/hidraw.c | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index be34d32906bd..7d05c4bb201e 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1066,7 +1066,7 @@ EXPORT_SYMBOL_GPL(hid_report_raw_event); | |||
1066 | * @type: HID report type (HID_*_REPORT) | 1066 | * @type: HID report type (HID_*_REPORT) |
1067 | * @data: report contents | 1067 | * @data: report contents |
1068 | * @size: size of data parameter | 1068 | * @size: size of data parameter |
1069 | * @interrupt: called from atomic? | 1069 | * @interrupt: distinguish between interrupt and control transfers |
1070 | * | 1070 | * |
1071 | * This is data entry for lower layers. | 1071 | * This is data entry for lower layers. |
1072 | */ | 1072 | */ |
diff --git a/drivers/hid/hid-twinhan.c b/drivers/hid/hid-twinhan.c index b05f602c051e..c40afc57fc8f 100644 --- a/drivers/hid/hid-twinhan.c +++ b/drivers/hid/hid-twinhan.c | |||
@@ -132,12 +132,12 @@ static struct hid_driver twinhan_driver = { | |||
132 | .input_mapping = twinhan_input_mapping, | 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 | return hid_register_driver(&twinhan_driver); | 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 | hid_unregister_driver(&twinhan_driver); | 142 | hid_unregister_driver(&twinhan_driver); |
143 | } | 143 | } |
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index ba05275e5104..cdd136942bca 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -48,10 +48,9 @@ static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count, | |||
48 | char *report; | 48 | char *report; |
49 | DECLARE_WAITQUEUE(wait, current); | 49 | DECLARE_WAITQUEUE(wait, current); |
50 | 50 | ||
51 | while (ret == 0) { | 51 | mutex_lock(&list->read_mutex); |
52 | |||
53 | mutex_lock(&list->read_mutex); | ||
54 | 52 | ||
53 | while (ret == 0) { | ||
55 | if (list->head == list->tail) { | 54 | if (list->head == list->tail) { |
56 | add_wait_queue(&list->hidraw->wait, &wait); | 55 | add_wait_queue(&list->hidraw->wait, &wait); |
57 | set_current_state(TASK_INTERRUPTIBLE); | 56 | set_current_state(TASK_INTERRUPTIBLE); |