diff mbox series

HID: nvidia-shield: add LEDS_CLASS dependency

Message ID 20230914000517.16252-1-rdunlap@infradead.org (mailing list archive)
State New
Delegated to: Jiri Kosina
Headers show
Series HID: nvidia-shield: add LEDS_CLASS dependency | expand

Commit Message

Randy Dunlap Sept. 14, 2023, 12:05 a.m. UTC
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")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
---
 drivers/hid/Kconfig |    1 +
 1 file changed, 1 insertion(+)

Comments

Rahul Rameshbabu Sept. 14, 2023, 2:09 a.m. UTC | #1
On Wed, 13 Sep, 2023 17:05:17 -0700 Randy Dunlap <rdunlap@infradead.org> 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")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Rahul Rameshbabu <rrameshbabu@nvidia.com>
> Cc: Jiri Kosina <jkosina@suse.cz>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: linux-input@vger.kernel.org
> ---
>  drivers/hid/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
>
> diff -- a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> --- 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.

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.

Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Jiri Kosina Sept. 18, 2023, 2:55 p.m. UTC | #2
On Wed, 13 Sep 2023, Randy Dunlap 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")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Rahul Rameshbabu <rrameshbabu@nvidia.com>
> Cc: Jiri Kosina <jkosina@suse.cz>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Cc: linux-input@vger.kernel.org
> ---
>  drivers/hid/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff -- a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> --- 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

Aplied, thanks.
diff mbox series

Patch

diff -- a/drivers/hid/Kconfig b/drivers/hid/Kconfig
--- 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.