* [PATCH 8/8] HID: roccat: Fixed bug that prevented roccat chardev from removing devices
@ 2011-01-30 12:38 Stefan Achatz
0 siblings, 0 replies; only message in thread
From: Stefan Achatz @ 2011-01-30 12:38 UTC (permalink / raw)
To: Randy Dunlap, Jiri Kosina, Mauro Carvalho Chehab, Stefan Achatz,
Andrew Morton, Thomas Weber, Greg Kroah-Hartman, linux-doc,
Hans Verkuil, linux-input, linux-kernel
pointer to device was cleared too early. This is fixed now.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
---
drivers/hid/hid-roccat.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/hid/hid-roccat.c b/drivers/hid/hid-roccat.c
index 0fa23de..bbe294c 100644
--- 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);
--
1.7.3.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-30 12:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-30 12:38 [PATCH 8/8] HID: roccat: Fixed bug that prevented roccat chardev from removing devices Stefan Achatz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®