diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-05-16 11:49:22 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-10-14 23:50:50 +0200 |
commit | 02ae9a1a8bc1d08a8fd5f6a0b8bde400b0f891b9 (patch) | |
tree | a7584d1e9bcabdd22e63c12326e696c94d38dad8 /drivers/hid/hid-core.c | |
parent | 8c19a51591d06f5226499972567f528cf6066bb7 (diff) |
HID: add compat support
Add compat option to hid code to allow loading of all modules on
systems which don't allow autoloading because of old userspace.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 8e3c264c9b2..397e1b2ffe5 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1532,6 +1532,14 @@ void hid_unregister_driver(struct hid_driver *hdrv) } EXPORT_SYMBOL_GPL(hid_unregister_driver); +#ifdef CONFIG_HID_COMPAT +static void hid_compat_load(struct work_struct *ws) +{ + request_module("hid-dummy"); +} +static DECLARE_WORK(hid_compat_work, hid_compat_load); +#endif + static int __init hid_init(void) { int ret; @@ -1546,6 +1554,10 @@ static int __init hid_init(void) if (ret) goto err_bus; +#ifdef CONFIG_HID_COMPAT + schedule_work(&hid_compat_work); +#endif + return 0; err_bus: bus_unregister(&hid_bus_type); |