[PATCH] net: dsa: realtek: add LEDS_CLASS dependency
From: Arnd Bergmann
Date: Tue May 28 2024 - 08:05:33 EST
From: Arnd Bergmann <arnd@xxxxxxxx>
This driver fails to link when LED support is disabled:
ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
Add a dependency that prevents this configuration.
Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/net/dsa/realtek/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/realtek/Kconfig b/drivers/net/dsa/realtek/Kconfig
index 6989972eebc3..6c90a83c71da 100644
--- a/drivers/net/dsa/realtek/Kconfig
+++ b/drivers/net/dsa/realtek/Kconfig
@@ -39,6 +39,7 @@ config NET_DSA_REALTEK_RTL8365MB
config NET_DSA_REALTEK_RTL8366RB
tristate "Realtek RTL8366RB switch driver"
depends on NET_DSA_REALTEK_SMI || NET_DSA_REALTEK_MDIO
+ depends on LEDS_CLASS
select NET_DSA_TAG_RTL4_A
help
Select to enable support for Realtek RTL8366RB.
--
2.39.2