Commit 10204020 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] INPUT: register the input class device sooner

This is needed so we can actually use the class device within the input
handlers.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5c1e9a6a
...@@ -795,6 +795,9 @@ void input_register_device(struct input_dev *dev) ...@@ -795,6 +795,9 @@ void input_register_device(struct input_dev *dev)
INIT_LIST_HEAD(&dev->h_list); INIT_LIST_HEAD(&dev->h_list);
list_add_tail(&dev->node, &input_dev_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) list_for_each_entry(handler, &input_handler_list, node)
if (!handler->blacklist || !input_match_device(handler->blacklist, dev)) if (!handler->blacklist || !input_match_device(handler->blacklist, dev))
if ((id = input_match_device(handler->id_table, dev))) if ((id = input_match_device(handler->id_table, dev)))
...@@ -802,9 +805,6 @@ void input_register_device(struct input_dev *dev) ...@@ -802,9 +805,6 @@ void input_register_device(struct input_dev *dev)
input_link_handle(handle); input_link_handle(handle);
if (dev->dynalloc)
input_register_classdevice(dev);
#ifdef CONFIG_HOTPLUG #ifdef CONFIG_HOTPLUG
input_call_hotplug("add", dev); input_call_hotplug("add", dev);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment