vserver 1.9.5.x5
[linux-2.6.git] / drivers / input / input.c
index 73b1741..6ff0f38 100644 (file)
@@ -17,9 +17,8 @@
 #include <linux/module.h>
 #include <linux/random.h>
 #include <linux/major.h>
-#include <linux/pm.h>
 #include <linux/proc_fs.h>
-#include <linux/kmod.h>
+#include <linux/kobject_uevent.h>
 #include <linux/interrupt.h>
 #include <linux/poll.h>
 #include <linux/device.h>
@@ -67,13 +66,10 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, in
 {
        struct input_handle *handle;
 
-       if (dev->pm_dev)
-               pm_access(dev->pm_dev);
-
        if (type > EV_MAX || !test_bit(type, dev->evbit))
                return;
 
-       add_mouse_randomness((type << 4) ^ code ^ (code >> 4) ^ value);
+       add_input_randomness(type, code, value);
 
        switch (type) {
 
@@ -230,8 +226,6 @@ void input_release_device(struct input_handle *handle)
 
 int input_open_device(struct input_handle *handle)
 {
-       if (handle->dev->pm_dev)
-               pm_access(handle->dev->pm_dev);
        handle->open++;
        if (handle->dev->open)
                return handle->dev->open(handle->dev);
@@ -249,8 +243,6 @@ int input_flush_device(struct input_handle* handle, struct file* file)
 void input_close_device(struct input_handle *handle)
 {
        input_release_device(handle);
-       if (handle->dev->pm_dev)
-               pm_dev_idle(handle->dev->pm_dev);
        if (handle->dev->close)
                handle->dev->close(handle->dev);
        handle->open--;
@@ -369,7 +361,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
 
        argv[0] = hotplug_path;
        argv[1] = "input";
-       argv[2] = 0;
+       argv[2] = NULL;
 
        envp[i++] = "HOME=/";
        envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
@@ -402,7 +394,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
        SPRINTF_BIT_A2(sndbit, "SND=", SND_MAX, EV_SND);
        SPRINTF_BIT_A2(ffbit,  "FF=",  FF_MAX, EV_FF);
 
-       envp[i++] = 0;
+       envp[i++] = NULL;
 
 #ifdef INPUT_DEBUG
        printk(KERN_DEBUG "input.c: calling %s %s [%s %s %s %s %s]\n",
@@ -468,9 +460,6 @@ void input_unregister_device(struct input_dev *dev)
 
        if (!dev) return;
 
-       if (dev->pm_dev)
-               pm_unregister(dev->pm_dev);
-
        del_timer_sync(&dev->timer);
 
        list_for_each_safe(node, next, &dev->h_list) {