Skip to content

Commit c0bf998

Browse files
committed
HID: intel-thc: fix CONFIG_HID dependency
JIRA: https://issues.redhat.com/browse/RHEL-94431 Upstream status: v6.15 Conflicts: INTEL_THC_HID has not been added Omitted-fix: 1b2d053 HID: intel-thc-hid: Add basic THC driver skeleton was added upstream on 2025-01-06 commit a5a056c Author: Arnd Bergmann <arnd@arndb.de> Date: Thu Jan 23 14:48:12 2025 +0100 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: 1b2d053 ("HID: intel-thc-hid: Add basic THC driver skeleton") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> Reviewed-by: Even Xu <even.xu@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> Signed-off-by: Tony Camuso <tcamuso@redhat.com>
1 parent 6417985 commit c0bf998

File tree

7 files changed

+10
-13
lines changed

7 files changed

+10
-13
lines changed

drivers/hid/Kconfig

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,10 +1339,6 @@ endmenu
13391339

13401340
source "drivers/hid/bpf/Kconfig"
13411341

1342-
endif # HID
1343-
1344-
source "drivers/hid/usbhid/Kconfig"
1345-
13461342
source "drivers/hid/i2c-hid/Kconfig"
13471343

13481344
source "drivers/hid/intel-ish-hid/Kconfig"
@@ -1351,4 +1347,11 @@ source "drivers/hid/amd-sfh-hid/Kconfig"
13511347

13521348
source "drivers/hid/surface-hid/Kconfig"
13531349

1350+
1351+
endif # HID
1352+
1353+
# USB support may be used with HID disabled
1354+
1355+
source "drivers/hid/usbhid/Kconfig"
1356+
13541357
endif # HID_SUPPORT

drivers/hid/amd-sfh-hid/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ menu "AMD SFH HID Support"
55

66
config AMD_SFH_HID
77
tristate "AMD Sensor Fusion Hub"
8-
depends on HID
98
depends on X86
109
help
1110
If you say yes to this option, support will be included for the

drivers/hid/i2c-hid/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
menuconfig I2C_HID
33
tristate "I2C HID support"
44
default y
5-
depends on I2C && INPUT && HID
5+
depends on I2C
66

77
if I2C_HID
88

drivers/hid/intel-ish-hid/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ config INTEL_ISH_HID
66
tristate "Intel Integrated Sensor Hub"
77
default n
88
depends on X86
9-
depends on HID
109
help
1110
The Integrated Sensor Hub (ISH) enables the ability to offload
1211
sensor polling and algorithm processing to a dedicated low power

drivers/hid/surface-hid/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0+
22
menu "Surface System Aggregator Module HID support"
33
depends on SURFACE_AGGREGATOR
4-
depends on INPUT
54

65
config SURFACE_HID
76
tristate "HID transport driver for Surface System Aggregator Module"
@@ -39,4 +38,3 @@ endmenu
3938

4039
config SURFACE_HID_CORE
4140
tristate
42-
select HID

drivers/hid/usbhid/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ menu "USB HID support"
55
config USB_HID
66
tristate "USB HID transport layer"
77
default y
8-
depends on USB && INPUT
9-
select HID
8+
depends on HID
109
help
1110
Say Y here if you want to connect USB keyboards,
1211
mice, joysticks, graphic tablets, or any other HID based devices

net/bluetooth/hidp/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config BT_HIDP
33
tristate "HIDP protocol support"
4-
depends on BT_BREDR && INPUT && HID_SUPPORT
5-
select HID
4+
depends on BT_BREDR && HID
65
help
76
HIDP (Human Interface Device Protocol) is a transport layer
87
for HID reports. HIDP is required for the Bluetooth Human

0 commit comments

Comments
 (0)