X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Finput%2Ftsdev.c;h=9c00dbd39c6fa5457e0f759a0561c5716e721101;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=18c37d8ac5d6f23cdebeebc74a2cf1fbd559c59c;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index 18c37d8ac..9c00dbd39 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c @@ -1,7 +1,7 @@ /* * $Id: tsdev.c,v 1.15 2002/04/10 16:50:19 jsimmons Exp $ * - * Copyright (c) 2001 "Crazy" james Simmons + * Copyright (c) 2001 "Crazy" james Simmons * * Compaq touchscreen protocol driver. The protocol emulated by this driver * is obsolete; for new programs use the tslib library which can read directly @@ -177,8 +177,6 @@ static int tsdev_open(struct inode *inode, struct file *file) static void tsdev_free(struct tsdev *tsdev) { - devfs_remove("input/ts%d", tsdev->minor); - class_simple_device_remove(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); tsdev_table[tsdev->minor] = NULL; kfree(tsdev); } @@ -418,7 +416,7 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); - class_simple_device_add(input_class, + class_simple_device_add(input_class, MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), dev->dev, "ts%d", minor); @@ -429,6 +427,9 @@ static void tsdev_disconnect(struct input_handle *handle) { struct tsdev *tsdev = handle->private; + class_simple_device_remove(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); + devfs_remove("input/ts%d", tsdev->minor); + devfs_remove("input/tsraw%d", tsdev->minor); tsdev->exist = 0; if (tsdev->open) { @@ -436,7 +437,6 @@ static void tsdev_disconnect(struct input_handle *handle) wake_up_interruptible(&tsdev->wait); } else tsdev_free(tsdev); - devfs_remove("input/tsraw%d", tsdev->minor); } static struct input_device_id tsdev_ids[] = {