Commit a5a056c8 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jiri Kosina
Browse files

HID: intel-thc: fix CONFIG_HID dependency



In drivers/hid/, most drivers depend on CONFIG_HID, while a couple of the
drivers in subdirectories instead depend on CONFIG_HID_SUPPORT and use
'select HID'. With the newly added INTEL_THC_HID, this causes a build
warning for a circular dependency:

WARNING: unmet direct dependencies detected for HID
  Depends on [m]: HID_SUPPORT [=y] && INPUT [=m]
  Selected by [y]:
  - INTEL_THC_HID [=y] && HID_SUPPORT [=y] && X86_64 [=y] && PCI [=y] && ACPI [=y]

WARNING: unmet direct dependencies detected for INPUT_FF_MEMLESS
  Depends on [m]: INPUT [=m]
  Selected by [y]:
  - HID_MICROSOFT [=y] && HID_SUPPORT [=y] && HID [=y]
  - GREENASIA_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_GREENASIA [=y]
  - HID_WIIMOTE [=y] && HID_SUPPORT [=y] && HID [=y] && LEDS_CLASS [=y]
  - ZEROPLUS_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_ZEROPLUS [=y]
  Selected by [m]:
  - HID_ACRUX_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_ACRUX [=m]
  - HID_EMS_FF [=m] && HID_SUPPORT [=y] && HID [=y]
  - HID_GOOGLE_STADIA_FF [=m] && HID_SUPPORT [=y] && HID [=y]
  - PANTHERLORD_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_PANTHERLORD [=m]

It's better to be consistent and always use 'depends on HID' for HID
drivers. The notable exception here is USB_KBD/USB_MOUSE, which are
alternative implementations that do not depend on the HID subsystem.

Do this by extending the "if HID" section below, which means that a few
of the duplicate "depends on HID" and "depends on INPUT" statements
can be removed in the process.

Fixes: 1b2d0538 ("HID: intel-thc-hid: Add basic THC driver skeleton")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: default avatarEven Xu <even.xu@intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 52572cde
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1376,10 +1376,6 @@ endmenu

source "drivers/hid/bpf/Kconfig"

endif # HID

source "drivers/hid/usbhid/Kconfig"

source "drivers/hid/i2c-hid/Kconfig"

source "drivers/hid/intel-ish-hid/Kconfig"
@@ -1390,4 +1386,10 @@ source "drivers/hid/surface-hid/Kconfig"

source "drivers/hid/intel-thc-hid/Kconfig"

endif # HID

# USB support may be used with HID disabled

source "drivers/hid/usbhid/Kconfig"

endif # HID_SUPPORT
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@ menu "AMD SFH HID Support"

config AMD_SFH_HID
	tristate "AMD Sensor Fusion Hub"
	depends on HID
	depends on X86
	help
	  If you say yes to this option, support will be included for the
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
menuconfig I2C_HID
	tristate "I2C HID support"
	default y
	depends on I2C && INPUT && HID
	depends on I2C

if I2C_HID

+0 −1
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ config INTEL_ISH_HID
	tristate "Intel Integrated Sensor Hub"
	default n
	depends on X86
	depends on HID
	help
	  The Integrated Sensor Hub (ISH) enables the ability to offload
	  sensor polling and algorithm processing to a dedicated low power
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ menu "Intel THC HID Support"
config INTEL_THC_HID
	tristate "Intel Touch Host Controller"
	depends on ACPI
	select HID
	help
	  THC (Touch Host Controller) is the name of the IP block in PCH that
	  interfaces with Touch Devices (ex: touchscreen, touchpad etc.). It
Loading