1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/dsa
Linus Walleij f15176b8b6 net: dsa: rtl8366rb: Fix compilation problem
When the kernel is compiled without LED framework support the
rtl8366rb fails to build like this:

rtl8366rb.o: in function `rtl8366rb_setup_led':
rtl8366rb.c:953:(.text.unlikely.rtl8366rb_setup_led+0xe8):
  undefined reference to `led_init_default_state_get'
rtl8366rb.c:980:(.text.unlikely.rtl8366rb_setup_led+0x240):
  undefined reference to `devm_led_classdev_register_ext'

As this is constantly coming up in different randconfig builds,
bite the bullet and create a separate file for the offending
code, split out a header with all stuff needed both in the
core driver and the leds code.

Add a new bool Kconfig option for the LED compile target, such
that it depends on LEDS_CLASS=y || LEDS_CLASS=RTL8366RB
which make LED support always available when LEDS_CLASS is
compiled into the kernel and enforce that if the LEDS_CLASS
is a module, then the RTL8366RB driver needs to be a module
as well so that modprobe can resolve the dependencies.

Fixes: 32d6170054 ("net: dsa: realtek: add LED drivers for rtl8366rb")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502070525.xMUImayb-lkp@intel.com/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2025-02-24 09:14:42 +00:00
..
b53 net: phylink: pass neg_mode into .pcs_get_state() method 2025-01-15 13:23:30 -08:00
hirschmann net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
microchip net: dsa: ksz: remove ksz_get_mac_eee() 2025-01-07 18:06:17 -08:00
mv88e6xxx Networking changes for 6.14. 2025-01-22 08:28:57 -08:00
ocelot net: dsa: felix: report timestamping stats from the ocelot library 2025-01-17 20:01:10 -08:00
qca net: phylink: pass neg_mode into .pcs_get_state() method 2025-01-15 13:23:30 -08:00
realtek net: dsa: rtl8366rb: Fix compilation problem 2025-02-24 09:14:42 +00:00
sja1105 lib: packing: demote truncation error in pack() to a warning in __pack() 2024-12-11 20:12:59 -08:00
xrs700x net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
bcm_sf2.c net: dsa: b53/bcm_sf2: remove b53_get_mac_eee() 2025-01-07 18:06:17 -08:00
bcm_sf2.h net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
bcm_sf2_cfp.c net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
dsa_loop.c net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
dsa_loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsa_loop_bdinfo.c net: fill in MODULE_DESCRIPTION()s for dsa_loop_bdinfo 2024-02-09 14:12:02 -08:00
Kconfig net: dsa: vsc73xx: Implement the tag_8021q VLAN operations 2024-07-15 06:55:15 -07:00
lan9303-core.c net: dsa: lan9303: ensure chip reset and wait for READY status 2024-10-07 16:38:02 -07:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_i2c.c net: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-26 07:28:08 -07:00
lan9303_mdio.c dsa: lan9303: consistent naming for PHY address parameter 2024-07-15 08:49:59 -07:00
lantiq_gswip.c net: dsa: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
mt7530-mdio.c net: dsa: mt7530-mdio: read PHY address of switch from device tree 2024-04-23 10:32:40 +02:00
mt7530-mmio.c net: dsa: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
mt7530.c net: phylink: pass neg_mode into .pcs_get_state() method 2025-01-15 13:23:30 -08:00
mt7530.h net: dsa: mt7530: Add TBF qdisc offload support 2024-11-03 12:53:42 -08:00
mv88e6060.c net: dsa: mv88e6060: add phylink_get_caps implementation 2023-08-14 18:57:17 -07:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
rzn1_a5psw.c net: dsa: use ethtool string helpers 2024-11-03 10:36:34 -08:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add vlan support 2023-08-11 11:58:36 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: fix reception from VLAN-unaware bridges 2024-10-15 18:41:52 -07:00
vitesse-vsc73xx-platform.c net: dsa: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xx: implement FDB operations 2024-09-03 10:22:58 +02:00