Arnd BergmannandFelix Fietkau cc56c40016 mt76: fix LED link time failure
The mt76_led_cleanup() function is called unconditionally, which
leads to a link error when CONFIG_LEDS is a loadable module or
disabled but mt76 is built-in:

drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_unregister_device':
mac80211.c:(.text+0x2ac): undefined reference to `led_classdev_unregister'

Use the same trick that is guarding the registration, using an
IS_ENABLED() check for the CONFIG_MT76_LEDS symbol that indicates
whether LEDs can be used or not.

Fixes: 36f7e2b2bb1d ("mt76: do not use devm API for led classdev")
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
2020-02-14 10:07:05 +01:00
2015-12-13 17:54:16 +01:00
2019-12-14 18:16:08 +01:00
2020-02-14 10:07:05 +01:00
2019-12-22 15:17:42 +01:00
2019-08-22 09:26:30 +02:00
S
Description
mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
BSD-3-Clause
105 MiB
Languages
C 99.7%
Perl 0.2%
Makefile 0.1%