]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
HID: force HID depending on INPUT
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 18 Nov 2022 10:54:48 +0000 (11:54 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 21 Nov 2022 17:37:08 +0000 (18:37 +0100)
In most configurations, INPUT is actually a boolean: either y or disabled,
but when it's disabled, you can't do much on your average laptop.

But it turns out that there is a possibility to have INPUT as a module:
you have to disable VT and TTY (of course), but also enable EXPERT.
I'll leave how to disable VT and TTY as an exercise for the bravest.

Anyway, if INPUT is m, we can still configure HID as y, which is not
correct because hid-input.c depends on the input API, meaning that
vmlinuz can not link.

So: add depends on INPUT too at the HID level, to ensure that if INPUT=m,
HID can only be m or disabled.

Fixes: 25621bcc8976 ("HID: Kconfig: split HID support and hid-core compilation")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/202211181742.QYJY6Gug-lkp@intel.com
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/Kconfig

index ff40c18f4a2b4a77dbe2a1df86f4c7341171ded1..b345bbfb57bf6f1d352b514f84d97b2771c202b7 100644 (file)
@@ -15,6 +15,7 @@ if HID_SUPPORT
 config HID
        tristate "HID bus core support"
        default y
+       depends on INPUT
        help
          A human interface device (HID) is a type of computer device that
          interacts directly with and takes input from humans. The term "HID"