diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 16:09:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 16:09:47 -0400 |
commit | 84860bf0644d7c45afe7ddbd30731c3e3c371fae (patch) | |
tree | d6c4b98a9c3fd9981e7fcc5d7729c9e01e327767 /drivers/input/evdev.c | |
parent | 8caf89157d64f1eedba37113afb4b303b2b3e301 (diff) | |
parent | 6fbfddcb52d8d9fa2cd209f5ac2a1c87497d55b5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r-- | drivers/input/evdev.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 3738d173f9a6..a4696cd0978c 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/major.h> | 20 | #include <linux/major.h> |
21 | #include <linux/smp_lock.h> | 21 | #include <linux/smp_lock.h> |
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/devfs_fs_kernel.h> | ||
24 | #include <linux/compat.h> | 23 | #include <linux/compat.h> |
25 | 24 | ||
26 | struct evdev { | 25 | struct evdev { |
@@ -662,6 +661,7 @@ static struct file_operations evdev_fops = { | |||
662 | static struct input_handle *evdev_connect(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id) | 661 | static struct input_handle *evdev_connect(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id) |
663 | { | 662 | { |
664 | struct evdev *evdev; | 663 | struct evdev *evdev; |
664 | struct class_device *cdev; | ||
665 | int minor; | 665 | int minor; |
666 | 666 | ||
667 | for (minor = 0; minor < EVDEV_MINORS && evdev_table[minor]; minor++); | 667 | for (minor = 0; minor < EVDEV_MINORS && evdev_table[minor]; minor++); |
@@ -687,11 +687,13 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct | |||
687 | 687 | ||
688 | evdev_table[minor] = evdev; | 688 | evdev_table[minor] = evdev; |
689 | 689 | ||
690 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | 690 | cdev = class_device_create(&input_class, &dev->cdev, |
691 | S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); | ||
692 | class_device_create(input_class, | ||
693 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | 691 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), |
694 | dev->dev, "event%d", minor); | 692 | dev->cdev.dev, evdev->name); |
693 | |||
694 | /* temporary symlink to keep userspace happy */ | ||
695 | sysfs_create_link(&input_class.subsys.kset.kobj, &cdev->kobj, | ||
696 | evdev->name); | ||
695 | 697 | ||
696 | return &evdev->handle; | 698 | return &evdev->handle; |
697 | } | 699 | } |
@@ -701,9 +703,9 @@ static void evdev_disconnect(struct input_handle *handle) | |||
701 | struct evdev *evdev = handle->private; | 703 | struct evdev *evdev = handle->private; |
702 | struct evdev_list *list; | 704 | struct evdev_list *list; |
703 | 705 | ||
704 | class_device_destroy(input_class, | 706 | sysfs_remove_link(&input_class.subsys.kset.kobj, evdev->name); |
707 | class_device_destroy(&input_class, | ||
705 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); | 708 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); |
706 | devfs_remove("input/event%d", evdev->minor); | ||
707 | evdev->exist = 0; | 709 | evdev->exist = 0; |
708 | 710 | ||
709 | if (evdev->open) { | 711 | if (evdev->open) { |