[PATCH] INPUT: register the input class device sooner
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 05:25:43 +0000 (22:25 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 16:52:54 +0000 (09:52 -0700)
This is needed so we can actually use the class device within the input
handlers.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/input/input.c

index 57fbfd907157f921fce64dfc91d544fa887d5a24..03c2ca404f20e06b150d915d1be6ef75d42ec0b4 100644 (file)
@@ -795,6 +795,9 @@ void input_register_device(struct input_dev *dev)
        INIT_LIST_HEAD(&dev->h_list);
        list_add_tail(&dev->node, &input_dev_list);
 
+       if (dev->dynalloc)
+               input_register_classdevice(dev);
+
        list_for_each_entry(handler, &input_handler_list, node)
                if (!handler->blacklist || !input_match_device(handler->blacklist, dev))
                        if ((id = input_match_device(handler->id_table, dev)))
@@ -802,9 +805,6 @@ void input_register_device(struct input_dev *dev)
                                        input_link_handle(handle);
 
 
-       if (dev->dynalloc)
-               input_register_classdevice(dev);
-
 #ifdef CONFIG_HOTPLUG
        input_call_hotplug("add", dev);
 #endif