]> err.no Git - linux-2.6/blobdiff - drivers/input/joydev.c
Merge git://git.linux-xtensa.org/kernel/xtensa-feed
[linux-2.6] / drivers / input / joydev.c
index 4f37224d2268b9378268ff90ab2af14e9c466749..10e3b7bc925fd7b68ca8e7bb418d39471caa776c 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/module.h>
 #include <linux/poll.h>
 #include <linux/init.h>
-#include <linux/smp_lock.h>
 #include <linux/device.h>
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
@@ -560,7 +559,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev,
        }
 
        /* temporary symlink to keep userspace happy */
-       error = sysfs_create_link(&input_class.subsys.kset.kobj,
+       error = sysfs_create_link(&input_class.subsys.kobj,
                                  &cdev->kobj, joydev->name);
        if (error)
                goto err_cdev_destroy;
@@ -572,7 +571,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev,
        return 0;
 
  err_remove_link:
-       sysfs_remove_link(&input_class.subsys.kset.kobj, joydev->name);
+       sysfs_remove_link(&input_class.subsys.kobj, joydev->name);
  err_cdev_destroy:
        class_device_destroy(&input_class, devt);
  err_free_joydev:
@@ -589,15 +588,15 @@ static void joydev_disconnect(struct input_handle *handle)
 
        input_unregister_handle(handle);
 
-       sysfs_remove_link(&input_class.subsys.kset.kobj, joydev->name);
+       sysfs_remove_link(&input_class.subsys.kobj, joydev->name);
        class_device_destroy(&input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
        joydev->exist = 0;
 
        if (joydev->open) {
                input_close_device(handle);
-               wake_up_interruptible(&joydev->wait);
                list_for_each_entry(client, &joydev->client_list, node)
                        kill_fasync(&client->fasync, SIGIO, POLL_HUP);
+               wake_up_interruptible(&joydev->wait);
        } else
                joydev_free(joydev);
 }