Skip to contentSkip to conversation

HID: nvidia-shield: add LEDS_CLASS dependency

PATCH In review Randy Dunlap 3 participants 3 messages Sep 14, 2023 – Sep 18, 2023 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: nvidia-shield: add LEDS_CLASS dependency

The hid-nvidia-shield driver uses functions that are built only when LEDS_CLASS is set, so make the driver depend on that symbol to prevent build errors.

riscv32-linux-ld: drivers/hid/hid-nvidia-shield.o: in function `.L11':
hid-nvidia-shield.c:(.text+0x192): undefined reference to `led_classdev_unregister'
riscv32-linux-ld: drivers/hid/hid-nvidia-shield.o: in function `.L113':
hid-nvidia-shield.c:(.text+0xfa4): undefined reference to `led_classdev_register_ext'

Fixes 09308562d4af ("HID: nvidia-shield: Initial driver implementation with Thunderstrike support")
Cc Rahul Rameshbabu <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc Benjamin Tissoires <[email protected]>
---
 drivers/hid/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/hid/Kconfig +1 -0
diff -- a/drivers/hid/Kconfig b/drivers/hid/Kconfig
@@ -799,6 +799,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	depends on LEDS_CLASS
 	help
 	  Support for NVIDIA SHIELD accessories.
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · On Wed, 13 Sep, 2023 17:05:17 -0700 Randy Dunlap <[email protected]> wrote:

The hid-nvidia-shield driver uses functions that are built only when LEDS_CLASS is set, so make the driver depend on that symbol to prevent build errors.

riscv32-linux-ld: drivers/hid/hid-nvidia-shield.o: in function `.L11':
hid-nvidia-shield.c:(.text+0x192): undefined reference to `led_classdev_unregister'
riscv32-linux-ld: drivers/hid/hid-nvidia-shield.o: in function `.L113':
hid-nvidia-shield.c:(.text+0xfa4): undefined reference to `led_classdev_register_ext'

Fixes 09308562d4af ("HID: nvidia-shield: Initial driver implementation with Thunderstrike support")
Cc Rahul Rameshbabu <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc Benjamin Tissoires <[email protected]>
---
 drivers/hid/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff -- a/drivers/hid/Kconfig b/drivers/hid/Kconfig

drivers/hid/Kconfig config HID_NVIDIA_SHIELD · line 804

Quoted 6 lines
drivers/hid/Kconfig +1 -0
@@ -799,6 +799,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	depends on LEDS_CLASS
 	help
 	  Support for NVIDIA SHIELD accessories.

Thanks for the patch. This also reminds me that the same needs to be done for POWER_SUPPLY since support was added for the controller's battery. I will send out a patch for that soon.

maintainer
#2 lore raw
In reply to Randy Dunlap
Quoted 23 lines · Randy Dunlap

The hid-nvidia-shield driver uses functions that are built only when LEDS_CLASS is set, so make the driver depend on that symbol to prevent build errors.

riscv32-linux-ld: drivers/hid/hid-nvidia-shield.o: in function `.L11':
hid-nvidia-shield.c:(.text+0x192): undefined reference to `led_classdev_unregister'
riscv32-linux-ld: drivers/hid/hid-nvidia-shield.o: in function `.L113':
hid-nvidia-shield.c:(.text+0xfa4): undefined reference to `led_classdev_register_ext'

Fixes 09308562d4af ("HID: nvidia-shield: Initial driver implementation with Thunderstrike support")
Cc Rahul Rameshbabu <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc Benjamin Tissoires <[email protected]>
---
 drivers/hid/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff -- a/drivers/hid/Kconfig b/drivers/hid/Kconfig

drivers/hid/Kconfig config HID_NVIDIA_SHIELD · line 802

Quoted 4 lines
drivers/hid/Kconfig +1 -0
@@ -799,6 +799,7 @@ config HID_NVIDIA_SHIELD
 	tristate "NVIDIA SHIELD devices"
 	depends on USB_HID
 	depends on BT_HIDP
+	depends on LEDS_CLASS

Aplied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs