diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-13 10:10:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-13 10:10:33 -0700 |
commit | 03266d28ca5bf1959ee91dc6554c01b790975352 (patch) | |
tree | f98e36f3d3108344a82e9ccdb30790121ed93b5e | |
parent | ae445b9134126314844ad9e84010bae5e6684103 (diff) | |
parent | b0e14951ee0f6c29abc64b92ec7075a159ede37c (diff) | |
download | kernel-crypto-03266d28ca5bf1959ee91dc6554c01b790975352.tar.gz kernel-crypto-03266d28ca5bf1959ee91dc6554c01b790975352.tar.xz kernel-crypto-03266d28ca5bf1959ee91dc6554c01b790975352.zip |
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
-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 be34d32906b..7d05c4bb201 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1066,7 +1066,7 @@ EXPORT_SYMBOL_GPL(hid_report_raw_event); * @type: HID report type (HID_*_REPORT) * @data: report contents * @size: size of data parameter - * @interrupt: called from atomic? + * @interrupt: distinguish between interrupt and control transfers * * This is data entry for lower layers. */ diff --git a/drivers/hid/hid-twinhan.c b/drivers/hid/hid-twinhan.c index b05f602c051..c40afc57fc8 100644 --- a/drivers/hid/hid-twinhan.c +++ b/drivers/hid/hid-twinhan.c @@ -132,12 +132,12 @@ static struct hid_driver twinhan_driver = { .input_mapping = twinhan_input_mapping, }; -static int twinhan_init(void) +static int __init twinhan_init(void) { return hid_register_driver(&twinhan_driver); } -static void twinhan_exit(void) +static void __exit twinhan_exit(void) { hid_unregister_driver(&twinhan_driver); } diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index ba05275e510..cdd136942bc 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, char *report; DECLARE_WAITQUEUE(wait, current); - while (ret == 0) { - - mutex_lock(&list->read_mutex); + mutex_lock(&list->read_mutex); + while (ret == 0) { if (list->head == list->tail) { add_wait_queue(&list->hidraw->wait, &wait); set_current_state(TASK_INTERRUPTIBLE); |