Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02ae9a1a authored by Jiri Slaby's avatar Jiri Slaby Committed by Jiri Kosina
Browse files

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: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 8c19a515
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -287,6 +287,13 @@ Who: Glauber Costa <gcosta@redhat.com>

---------------------------

What:	remove HID compat support
When:	2.6.29
Why:	needed only as a temporary solution until distros fix themselves up
Who:	Jiri Slaby <jirislaby@gmail.com>

---------------------------

What:	/sys/o2cb symlink
When:	January 2010
Why:	/sys/fs/o2cb is the proper location for this information - /sys/o2cb
+12 −0
Original line number Diff line number Diff line
@@ -70,6 +70,18 @@ source "drivers/hid/usbhid/Kconfig"
menu "Special HID drivers"
	depends on HID

config HID_COMPAT
	bool "Load all HID drivers on hid core load"
	default y
	---help---
	Compatible option for older userspace. If you have system without udev
	support of module loading through aliases and also old
	module-init-tools which can't handle hid bus, choose Y here. Otherwise
	say N. If you say N and your userspace is old enough, the only
	functionality you loose is modules autoloading.

	If unsure, say Y.

config HID_APPLE
	tristate "Apple"
	default m
+4 −0
Original line number Diff line number Diff line
@@ -8,6 +8,10 @@ obj-$(CONFIG_HID) += hid.o
hid-$(CONFIG_HID_DEBUG)		+= hid-debug.o
hid-$(CONFIG_HIDRAW)		+= hidraw.o

ifdef CONFIG_HID_COMPAT
obj-m				+= hid-dummy.o
endif

obj-$(CONFIG_HID_APPLE)		+= hid-apple.o
obj-$(CONFIG_HID_LOGITECH)	+= hid-logitech.o

+2 −0
Original line number Diff line number Diff line
@@ -477,3 +477,5 @@ static void apple_exit(void)
module_init(apple_init);
module_exit(apple_exit);
MODULE_LICENSE("GPL");

HID_COMPAT_LOAD_DRIVER(apple);
+12 −0
Original line number Diff line number Diff line
@@ -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);
Loading