Skip to content

Commit a5a056c

Browse files
arndbJiri Kosina
authored andcommitted
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 <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Reviewed-by: Maximilian Luz <[email protected]> Reviewed-by: Even Xu <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 52572cd commit a5a056c

File tree

8 files changed

+9
-14
lines changed

8 files changed

+9
-14
lines changed

drivers/hid/Kconfig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,10 +1376,6 @@ endmenu
13761376

13771377
source "drivers/hid/bpf/Kconfig"
13781378

1379-
endif # HID
1380-
1381-
source "drivers/hid/usbhid/Kconfig"
1382-
13831379
source "drivers/hid/i2c-hid/Kconfig"
13841380

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

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

1389+
endif # HID
1390+
1391+
# USB support may be used with HID disabled
1392+
1393+
source "drivers/hid/usbhid/Kconfig"
1394+
13931395
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/intel-thc-hid/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ menu "Intel THC HID Support"
77
config INTEL_THC_HID
88
tristate "Intel Touch Host Controller"
99
depends on ACPI
10-
select HID
1110
help
1211
THC (Touch Host Controller) is the name of the IP block in PCH that
1312
interfaces with Touch Devices (ex: touchscreen, touchpad etc.). It

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)