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/joydev.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/joydev.c')
| -rw-r--r-- | drivers/input/joydev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 822ae5473b3f..26f601905ebb 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -145,6 +145,7 @@ static void joydev_free(struct joydev *joydev) { devfs_remove("js%d", joydev->minor); joydev_table[joydev->minor] = NULL; + class_simple_device_remove(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); kfree(joydev); } @@ -444,6 +445,9 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), S_IFCHR|S_IRUGO|S_IWUSR, "js%d", minor); + class_simple_device_add(input_class, + MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), + dev->dev, "js%d", minor); return &joydev->handle; } |
