summaryrefslogtreecommitdiffstats
path: root/drivers/hid/Kconfig
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2022-11-03 16:57:43 +0100
committerJiri Kosina <jkosina@suse.cz>2022-11-15 16:28:28 +0100
commit25621bcc89762fe1329ae9c9dab75bc70ef1aee0 (patch)
tree64025970b1a5a5fd38d8343d70242db5ffa2f1d5 /drivers/hid/Kconfig
parent9c730fe10493d309f402cbd28ad539379b13a24d (diff)
downloadlinux-stable-25621bcc89762fe1329ae9c9dab75bc70ef1aee0.tar.gz
linux-stable-25621bcc89762fe1329ae9c9dab75bc70ef1aee0.tar.bz2
linux-stable-25621bcc89762fe1329ae9c9dab75bc70ef1aee0.zip
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>
Diffstat (limited to 'drivers/hid/Kconfig')
-rw-r--r--drivers/hid/Kconfig16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 185a077d59cd..72bbf9899993 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -2,12 +2,18 @@
#
# HID driver configuration
#
-menu "HID support"
- depends on INPUT
+menuconfig HID_SUPPORT
+ bool "HID bus support"
+ default y
+ depends on INPUT
+ help
+ This option adds core support for human interface device (HID).
+ You will also need drivers from the following menu to make use of it.
+
+if HID_SUPPORT
config HID
- tristate "HID bus support"
- depends on INPUT
+ tristate "HID bus core support"
default y
help
A human interface device (HID) is a type of computer device that
@@ -1290,4 +1296,4 @@ source "drivers/hid/amd-sfh-hid/Kconfig"
source "drivers/hid/surface-hid/Kconfig"
-endmenu
+endif # HID_SUPPORT