summaryrefslogtreecommitdiff
path: root/drivers/input/joydev.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2004-10-21 13:50:25 -0500
committerVojtech Pavlik <vojtech@suse.cz>2004-10-21 13:50:25 -0500
commit369dc5effad22d4fa9263b82d991f2ab19a1b24f (patch)
tree89af490f609aec2cde1bf76b160aaeee59c7d23c /drivers/input/joydev.c
parent5e733a371adf693160ebe50e8e147c69cc6b3e57 (diff)
Input: evdev, joydev, mousedev, tsdev - remove class device and devfs
entry when hardware driver disconnects instead of waiting for the last user to drop off. This way hardware drivers can be unloaded at any time. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joydev.c')
-rw-r--r--drivers/input/joydev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 3e47218e0d6a..4fe982d63bed 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -143,9 +143,7 @@ static int joydev_fasync(int fd, struct file *file, int on)
static void joydev_free(struct joydev *joydev)
{
- devfs_remove("input/js%d", joydev->minor);
joydev_table[joydev->minor] = NULL;
- class_simple_device_remove(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
kfree(joydev);
}
@@ -466,6 +464,8 @@ static void joydev_disconnect(struct input_handle *handle)
{
struct joydev *joydev = handle->private;
+ class_simple_device_remove(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
+ devfs_remove("input/js%d", joydev->minor);
joydev->exist = 0;
if (joydev->open)