aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/Kconfig
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-11-05 16:51:47 +0100
committerKalle Valo <kvalo@codeaurora.org>2018-11-06 18:46:33 +0200
commitb374e8686fc35ae124e62dc78725ea656ba1ef8a (patch)
tree6ff6284530d20e73aa42d28fb0e6009917faa317 /drivers/net/wireless/mediatek/mt76/Kconfig
parentbrcmutil: really fix decoding channel info for 160 MHz bandwidth (diff)
downloadlinux-dev-b374e8686fc35ae124e62dc78725ea656ba1ef8a.tar.xz
linux-dev-b374e8686fc35ae124e62dc78725ea656ba1ef8a.zip
mt76: fix building without CONFIG_LEDS_CLASS
When CONFIG_LEDS_CLASS is disabled, or it is a loadable module while mt76 is built-in, we run into a link error: drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_register_device': mac80211.c:(.text+0xb78): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `devm_of_led_classdev_register' We don't really need a hard dependency here as the driver can presumably work just fine without LEDs, so this follows the iwlwifi example and adds a separate Kconfig option for the LED support, this will be available whenever it will link, and otherwise the respective code gets left out from the driver object. Fixes: 17f1de56df05 ("mt76: add common code shared between multiple chipsets") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/Kconfig')
-rw-r--r--drivers/net/wireless/mediatek/mt76/Kconfig6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/Kconfig b/drivers/net/wireless/mediatek/mt76/Kconfig
index 0ccbcd7e887d..c30d8f5bbf2a 100644
--- a/drivers/net/wireless/mediatek/mt76/Kconfig
+++ b/drivers/net/wireless/mediatek/mt76/Kconfig
@@ -1,6 +1,12 @@
config MT76_CORE
tristate
+config MT76_LEDS
+ bool
+ depends on MT76_CORE
+ depends on LEDS_CLASS=y || MT76_CORE=LEDS_CLASS
+ default y
+
config MT76_USB
tristate
depends on MT76_CORE