Message ID | 1296263850.2299.11.camel@neuromancer (mailing list archive) |
---|---|
State | Accepted |
Commit | 3a22ebe9cc76acac2511b1d3979a35609924ce42 |
Headers | show |
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 468e87b..5516ea4 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -428,12 +428,12 @@ void hidraw_disconnect(struct hid_device *hid) hidraw->exist = 0; + device_destroy(hidraw_class, MKDEV(hidraw_major, hidraw->minor)); + mutex_lock(&minors_lock); hidraw_table[hidraw->minor] = NULL; mutex_unlock(&minors_lock); - device_destroy(hidraw_class, MKDEV(hidraw_major, hidraw->minor)); - if (hidraw->open) { hid_hw_close(hid); wake_up_interruptible(&hidraw->wait);