From: Stefan Achatz <erazor_de@users.sourceforge.net>
To: Randy Dunlap <rdunlap@xenotime.net>,
Jiri Kosina <jkosina@suse.cz>,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Stefan Achatz <erazor_de@users.sourceforge.net>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Weber <weber@corscience.de>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-doc@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 8/8] HID: roccat: Fixed bug that prevented roccat chardev from removing devices
Date: Sun, 30 Jan 2011 13:38:30 +0100 [thread overview]
Message-ID: <1296391110.2283.187.camel@neuromancer> (raw)
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
reply other threads:[~2011-01-30 12:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296391110.2283.187.camel@neuromancer \
--to=erazor_de@users.sourceforge.net \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=hverkuil@xs4all.nl \
--cc=jkosina@suse.cz \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=rdunlap@xenotime.net \
--cc=weber@corscience.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®