aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-core.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-05-16 05:49:22 -0400
committerJiri Kosina <jkosina@suse.cz>2008-10-14 17:50:50 -0400
commit02ae9a1a8bc1d08a8fd5f6a0b8bde400b0f891b9 (patch)
treea7584d1e9bcabdd22e63c12326e696c94d38dad8 /drivers/hid/hid-core.c
parent8c19a51591d06f5226499972567f528cf6066bb7 (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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8e3c264c9b2b..397e1b2ffe5a 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)
1532} 1532}
1533EXPORT_SYMBOL_GPL(hid_unregister_driver); 1533EXPORT_SYMBOL_GPL(hid_unregister_driver);
1534 1534
1535#ifdef CONFIG_HID_COMPAT
1536static void hid_compat_load(struct work_struct *ws)
1537{
1538 request_module("hid-dummy");
1539}
1540static DECLARE_WORK(hid_compat_work, hid_compat_load);
1541#endif
1542
1535static int __init hid_init(void) 1543static int __init hid_init(void)
1536{ 1544{
1537 int ret; 1545 int ret;
@@ -1546,6 +1554,10 @@ static int __init hid_init(void)
1546 if (ret) 1554 if (ret)
1547 goto err_bus; 1555 goto err_bus;
1548 1556
1557#ifdef CONFIG_HID_COMPAT
1558 schedule_work(&hid_compat_work);
1559#endif
1560
1549 return 0; 1561 return 0;
1550err_bus: 1562err_bus:
1551 bus_unregister(&hid_bus_type); 1563 bus_unregister(&hid_bus_type);