X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Finput%2Fjoydev.c;h=4fe982d63bedecf573620953a298d3b1e35c6c28;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=3e47218e0d6a6942f48b49f5cd6d731805ee76d1;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 3e47218e0..4fe982d63 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)