diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2004-01-19 00:38:36 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-01-19 00:38:36 -0800 |
| commit | e5da64c4f47e45a433214ef4325d01f6d1d7efa2 (patch) | |
| tree | 6ec98b509254e1ec32f405014b2f4efb39f98266 /drivers/input/evdev.c | |
| parent | 90635a76999bc97e043e609e0682b62c414cb7eb (diff) | |
[PATCH] Input: add sysfs class support for input devices
This patch adds sysfs support for all input devices. It also provides
the "device" and "driver" symlink for all Input devices that specify it.
Diffstat (limited to 'drivers/input/evdev.c')
| -rw-r--r-- | drivers/input/evdev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index ab7bdedff9b6..8a165f585f0e 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -92,6 +92,7 @@ static int evdev_flush(struct file * file) static void evdev_free(struct evdev *evdev) { devfs_remove("input/event%d", evdev->minor); + class_simple_device_remove(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); evdev_table[evdev->minor] = NULL; kfree(evdev); } @@ -426,6 +427,9 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); + class_simple_device_add(input_class, + MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), + dev->dev, "event%d", minor); return &evdev->handle; } |
