This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / input / mousedev.c
index 19dea5e..bd1a6d9 100644 (file)
@@ -329,6 +329,8 @@ static int mousedev_fasync(int fd, struct file *file, int on)
 
 static void mousedev_free(struct mousedev *mousedev)
 {
+       devfs_remove("input/mouse%d", mousedev->minor);
+       class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
        mousedev_table[mousedev->minor] = NULL;
        kfree(mousedev);
 }
@@ -638,8 +640,6 @@ static void mousedev_disconnect(struct input_handle *handle)
 {
        struct mousedev *mousedev = handle->private;
 
-       class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
-       devfs_remove("input/mouse%d", mousedev->minor);
        mousedev->exist = 0;
 
        if (mousedev->open) {