Patch "mt76: fix LED link time failure" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mt76: fix LED link time failure

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mt76-fix-led-link-time-failure.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cfaa688252152650d8400c4047d4835a7ce92d5f
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Mon Dec 16 14:18:42 2019 +0100

    mt76: fix LED link time failure
    
    [ Upstream commit d68f4e43a46ff1f772ff73085f96d44eb4163e9d ]
    
    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 <arnd@xxxxxxxx>
    Acked-by: Felix Fietkau <nbd@xxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 7be5806a1c398..8bd191347b9fb 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -368,7 +368,8 @@ void mt76_unregister_device(struct mt76_dev *dev)
 {
 	struct ieee80211_hw *hw = dev->hw;
 
-	mt76_led_cleanup(dev);
+	if (IS_ENABLED(CONFIG_MT76_LEDS))
+		mt76_led_cleanup(dev);
 	mt76_tx_status_check(dev, NULL, true);
 	ieee80211_unregister_hw(hw);
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux