projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74b643d
)
HID: roccat: Fix bug that prevented roccat chardev from removing devices
author
Stefan Achatz
<
[email protected]
>
Sun, 30 Jan 2011 12:38:30 +0000
(13:38 +0100)
committer
Jiri Kosina
<
[email protected]
>
Thu, 3 Feb 2011 15:37:28 +0000
(16:37 +0100)
pointer to device was cleared too early. This is fixed now.
Signed-off-by: Stefan Achatz <
[email protected]
>
Signed-off-by: Jiri Kosina <
[email protected]
>
drivers/hid/hid-roccat.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hid-roccat.c
b/drivers/hid/hid-roccat.c
index 0fa23dead5e1ff5f74cdabf20ffca27eedd1a8c4..bbe294c0dd9baded8139bab42e7c58c13055d6d5 100644
(file)
--- a/
drivers/hid/hid-roccat.c
+++ b/
drivers/hid/hid-roccat.c
@@
-356,13
+356,16
@@
void roccat_disconnect(int minor)
mutex_lock(&devices_lock);
device = devices[minor];
- devices[minor] = NULL;
mutex_unlock(&devices_lock);
device->exist = 0; /* TODO exist maybe not needed */
device_destroy(device->dev->class, MKDEV(roccat_major, minor));
+ mutex_lock(&devices_lock);
+ devices[minor] = NULL;
+ mutex_unlock(&devices_lock);
+
if (device->open) {
hid_hw_close(device->hid);
wake_up_interruptible(&device->wait);