1
0
Fork 0
alistair23-linux/drivers/net/wireless/mediatek/mt76
Arnd Bergmann 87e6e1957c mt76: fix LED link time failure
[ Upstream commit d68f4e43a4 ]

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: 36f7e2b2bb ("mt76: do not use devm API for led classdev")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:18:11 +02:00
..
mt76x0 mt76: mt76u: rely on usb_interface instead of usb_dev 2020-01-26 10:01:08 +01:00
mt76x2 mt76: mt76x02u: Add support for newer versions of the XBox One wifi adapter 2020-06-07 13:18:47 +02:00
mt7603 mt76: add missing locking around ampdu action 2020-10-01 13:17:20 +02:00
mt7615 mt76: add missing locking around ampdu action 2020-10-01 13:17:20 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile mt76: mt76x2e: disable pcie_aspm by default 2019-10-30 16:59:46 +02:00
agg-rx.c mt76: clear skb pointers from rx aggregation reorder buffer during cleanup 2020-10-01 13:17:34 +02:00
debugfs.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
dma.c mt76: fix handling full tx queues in mt76_dma_tx_queue_skb_raw 2020-10-01 13:17:34 +02:00
dma.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
eeprom.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mac80211.c mt76: fix LED link time failure 2020-10-01 13:18:11 +02:00
mcu.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mmio.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76.h mt76: avoid rx reorder buffer overflow 2020-06-22 09:31:05 +02:00
mt76x02.h mt76: mt76x02u: Add support for newer versions of the XBox One wifi adapter 2020-06-07 13:18:47 +02:00
mt76x02_beacon.c mt76: mt76x02: do not copy beacon skb in mt76x02_mac_set_beacon_enable 2019-09-05 17:42:31 +02:00
mt76x02_debugfs.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_dfs.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_dfs.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_dma.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_eeprom.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_eeprom.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_mac.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_mac.h mt76: mt76x02: do not copy beacon skb in mt76x02_mac_set_beacon_enable 2019-09-05 17:42:31 +02:00
mt76x02_mcu.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_mcu.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_mmio.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_phy.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_phy.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_regs.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_trace.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_trace.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_txrx.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_usb.h mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_usb_core.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_usb_mcu.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
mt76x02_util.c mt76: add missing locking around ampdu action 2020-10-01 13:17:20 +02:00
pci.c mt76: mt76x2e: disable pcie_aspm by default 2019-10-30 16:59:46 +02:00
trace.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
trace.h mt76: fix some checkpatch warnings 2019-09-05 17:42:32 +02:00
tx.c mt76: remove offchannel check in tx scheduling 2019-09-05 17:42:32 +02:00
usb.c mt76: mt76u: rely on usb_interface instead of usb_dev 2020-01-26 10:01:08 +01:00
usb_trace.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
usb_trace.h mt76: fix some checkpatch warnings 2019-09-05 17:42:32 +02:00
util.c mt76: switch to SPDX tag instead of verbose boilerplate text 2019-09-05 17:42:31 +02:00
util.h mt76: fix some checkpatch warnings 2019-09-05 17:42:32 +02:00