igc: fix LEDS_CLASS dependency
authorArnd Bergmann <arnd@arndb.de>
Fri, 1 Mar 2024 18:48:04 +0000 (10:48 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 5 Mar 2024 04:49:58 +0000 (20:49 -0800)
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@arndb.de>
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20240301184806.2634508-4-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/Kconfig

index 767358b60507435fc9a19543b12c3890e721ae12..639fbb12bd350c3887981273fbea11b1b85546f0 100644 (file)
@@ -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
        help
          Optional support for controlling the NIC LED's with the netdev
          LED trigger.