[PATCH] Input: show sysfs path in /proc/bus/input/devices
[safe/jmp/linux-2.6] / drivers / input / joydev.c
index ff8e1bb..40d2b46 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/init.h>
 #include <linux/smp_lock.h>
 #include <linux/device.h>
-#include <linux/devfs_fs_kernel.h>
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
 MODULE_DESCRIPTION("Joystick device interfaces");
@@ -37,8 +36,6 @@ MODULE_LICENSE("GPL");
 #define JOYDEV_MINORS          16
 #define JOYDEV_BUFFER_SIZE     64
 
-#define MSECS(t)       (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ)
-
 struct joydev {
        int exist;
        int open;
@@ -117,7 +114,7 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne
                        return;
        }
 
-       event.time = MSECS(jiffies);
+       event.time = jiffies_to_msecs(jiffies);
 
        list_for_each_entry(list, &joydev->list, node) {
 
@@ -245,7 +242,7 @@ static ssize_t joydev_read(struct file *file, char __user *buf, size_t count, lo
 
                struct js_event event;
 
-               event.time = MSECS(jiffies);
+               event.time = jiffies_to_msecs(jiffies);
 
                if (list->startup < joydev->nkey) {
                        event.type = JS_EVENT_BUTTON | JS_EVENT_INIT;
@@ -516,9 +513,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
 
        joydev_table[minor] = joydev;
 
-       devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
-                       S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor);
-       class_device_create(input_class,
+       class_device_create(input_class, NULL,
                        MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
                        dev->dev, "js%d", minor);
 
@@ -531,7 +526,6 @@ static void joydev_disconnect(struct input_handle *handle)
        struct joydev_list *list;
 
        class_device_destroy(input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
-       devfs_remove("input/js%d", joydev->minor);
        joydev->exist = 0;
 
        if (joydev->open) {