All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-6.2/hid-bpf] HID: force HID depending on INPUT
@ 2022-11-18 10:54 Benjamin Tissoires
  2022-11-21 17:37 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Tissoires @ 2022-11-18 10:54 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: linux-input, linux-kernel, Benjamin Tissoires, kernel test robot

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>
---
 drivers/hid/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index ff40c18f4a2b..b345bbfb57bf 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -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"
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH for-6.2/hid-bpf] HID: force HID depending on INPUT
  2022-11-18 10:54 [PATCH for-6.2/hid-bpf] HID: force HID depending on INPUT Benjamin Tissoires
@ 2022-11-21 17:37 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2022-11-21 17:37 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: linux-input, linux-kernel, kernel test robot

On Fri, 18 Nov 2022, Benjamin Tissoires wrote:

> 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>

Applied as well to for-6.2/hid-bpf. Thanks,

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-21 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 10:54 [PATCH for-6.2/hid-bpf] HID: force HID depending on INPUT Benjamin Tissoires
2022-11-21 17:37 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.