aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tsdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/tsdev.c')
-rw-r--r--drivers/input/tsdev.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c
index d0afba85720b..50c63a155156 100644
--- a/drivers/input/tsdev.c
+++ b/drivers/input/tsdev.c
@@ -414,9 +414,9 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
414 S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); 414 S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor);
415 devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), 415 devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2),
416 S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); 416 S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor);
417 class_simple_device_add(input_class, 417 class_device_create(input_class,
418 MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), 418 MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
419 dev->dev, "ts%d", minor); 419 dev->dev, "ts%d", minor);
420 420
421 return &tsdev->handle; 421 return &tsdev->handle;
422} 422}
@@ -426,7 +426,8 @@ static void tsdev_disconnect(struct input_handle *handle)
426 struct tsdev *tsdev = handle->private; 426 struct tsdev *tsdev = handle->private;
427 struct tsdev_list *list; 427 struct tsdev_list *list;
428 428
429 class_simple_device_remove(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); 429 class_device_destroy(input_class,
430 MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor));
430 devfs_remove("input/ts%d", tsdev->minor); 431 devfs_remove("input/ts%d", tsdev->minor);
431 devfs_remove("input/tsraw%d", tsdev->minor); 432 devfs_remove("input/tsraw%d", tsdev->minor);
432 tsdev->exist = 0; 433 tsdev->exist = 0;