Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: Kconfig: split HID support and hid-core compilation

Currently, we step into drivers/hid/ based on the value of
CONFIG_HID.

However, that value is a tristate, meaning that it can be a module.

As per the documentation, if we jump into the subdirectory by
following an obj-m, we can not compile anything inside that
subdirectory in vmlinux. It is considered as a bug.

To make things more friendly to HID-BPF, split HID (the HID core
parameter) from HID_SUPPORT (do we want any kind of HID support in the
system?), and make this new config a boolean.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Benjamin Tissoires and committed by
Jiri Kosina
25621bcc 9c730fe1

+13 -7
+1 -1
drivers/Makefile
··· 137 137 obj-$(CONFIG_SUPERH) += sh/ 138 138 obj-y += clocksource/ 139 139 obj-$(CONFIG_DCA) += dca/ 140 - obj-$(CONFIG_HID) += hid/ 140 + obj-$(CONFIG_HID_SUPPORT) += hid/ 141 141 obj-$(CONFIG_PPC_PS3) += ps3/ 142 142 obj-$(CONFIG_OF) += of/ 143 143 obj-$(CONFIG_SSB) += ssb/
+11 -5
drivers/hid/Kconfig
··· 2 2 # 3 3 # HID driver configuration 4 4 # 5 - menu "HID support" 6 - depends on INPUT 5 + menuconfig HID_SUPPORT 6 + bool "HID bus support" 7 + default y 8 + depends on INPUT 9 + help 10 + This option adds core support for human interface device (HID). 11 + You will also need drivers from the following menu to make use of it. 12 + 13 + if HID_SUPPORT 7 14 8 15 config HID 9 - tristate "HID bus support" 10 - depends on INPUT 16 + tristate "HID bus core support" 11 17 default y 12 18 help 13 19 A human interface device (HID) is a type of computer device that ··· 1296 1290 1297 1291 source "drivers/hid/surface-hid/Kconfig" 1298 1292 1299 - endmenu 1293 + endif # HID_SUPPORT
+1 -1
drivers/hid/amd-sfh-hid/Kconfig
··· 2 2 menu "AMD SFH HID Support" 3 3 depends on X86_64 || COMPILE_TEST 4 4 depends on PCI 5 - depends on HID 6 5 7 6 config AMD_SFH_HID 8 7 tristate "AMD Sensor Fusion Hub" 8 + select HID 9 9 help 10 10 If you say yes to this option, support will be included for the 11 11 AMD Sensor Fusion Hub.