Re: [Intel-wired-lan] [PATCH] igc: fix LEDS_CLASS dependency

From: Paul Menzel
Date: Thu Feb 22 2024 - 05:22:11 EST


Dear Arnd,


Thank you for the patch.


Am 22.02.24 um 11:02 schrieb Arnd Bergmann:
From: Arnd Bergmann <arnd@xxxxxxxx>

When IGC is built-in but LEDS_CLASS is a loadable module, there is
a link failure:

x86_64-linux-ld: drivers/net/ethernet/intel/igc/igc_leds.o: in function `igc_led_setup':
igc_leds.c:(.text+0x75c): undefined reference to `devm_led_classdev_register_ext'

Add another dependency that prevents this combination.

Fixes: ea578703b03d ("igc: Add support for LEDs on i225/i226")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/net/ethernet/intel/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig
index af7fa6856707..6e7901e12699 100644
--- a/drivers/net/ethernet/intel/Kconfig
+++ b/drivers/net/ethernet/intel/Kconfig
@@ -372,6 +372,7 @@ config IGC
config IGC_LEDS
def_bool LEDS_TRIGGER_NETDEV
depends on IGC && LEDS_CLASS
+ depends on LEDS_CLASS=y || IGC=m

Should it be ordered as the line above?

help
Optional support for controlling the NIC LED's with the netdev
LED trigger.


Kind regards,

Paul