drivers/net/wireless/mediatek/mt76/mac80211.c:119: undefined reference to `devm_of_led_classdev_register'

From: kbuild test robot
Date: Fri Sep 14 2018 - 14:03:41 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f3c0b8ce48408b742a9154d53d19e3c7ff97772d
commit: 1ec49a236565060566be547b6e050bb414d0da96 mt76: fix build for MediaTek MT7610U USB wireless dongle
date: 5 weeks ago
config: x86_64-randconfig-s4-09142104 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 1ec49a236565060566be547b6e050bb414d0da96
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_led_init':
>> drivers/net/wireless/mediatek/mt76/mac80211.c:119: undefined reference to `devm_of_led_classdev_register'

vim +119 drivers/net/wireless/mediatek/mt76/mac80211.c

17f1de56 Felix Fietkau 2017-11-21 92
17f1de56 Felix Fietkau 2017-11-21 93 static int mt76_led_init(struct mt76_dev *dev)
17f1de56 Felix Fietkau 2017-11-21 94 {
17f1de56 Felix Fietkau 2017-11-21 95 struct device_node *np = dev->dev->of_node;
17f1de56 Felix Fietkau 2017-11-21 96 struct ieee80211_hw *hw = dev->hw;
17f1de56 Felix Fietkau 2017-11-21 97 int led_pin;
17f1de56 Felix Fietkau 2017-11-21 98
17f1de56 Felix Fietkau 2017-11-21 99 if (!dev->led_cdev.brightness_set && !dev->led_cdev.blink_set)
17f1de56 Felix Fietkau 2017-11-21 100 return 0;
17f1de56 Felix Fietkau 2017-11-21 101
17f1de56 Felix Fietkau 2017-11-21 102 snprintf(dev->led_name, sizeof(dev->led_name),
17f1de56 Felix Fietkau 2017-11-21 103 "mt76-%s", wiphy_name(hw->wiphy));
17f1de56 Felix Fietkau 2017-11-21 104
17f1de56 Felix Fietkau 2017-11-21 105 dev->led_cdev.name = dev->led_name;
17f1de56 Felix Fietkau 2017-11-21 106 dev->led_cdev.default_trigger =
17f1de56 Felix Fietkau 2017-11-21 107 ieee80211_create_tpt_led_trigger(hw,
17f1de56 Felix Fietkau 2017-11-21 108 IEEE80211_TPT_LEDTRIG_FL_RADIO,
17f1de56 Felix Fietkau 2017-11-21 109 mt76_tpt_blink,
17f1de56 Felix Fietkau 2017-11-21 110 ARRAY_SIZE(mt76_tpt_blink));
17f1de56 Felix Fietkau 2017-11-21 111
17f1de56 Felix Fietkau 2017-11-21 112 np = of_get_child_by_name(np, "led");
17f1de56 Felix Fietkau 2017-11-21 113 if (np) {
17f1de56 Felix Fietkau 2017-11-21 114 if (!of_property_read_u32(np, "led-sources", &led_pin))
17f1de56 Felix Fietkau 2017-11-21 115 dev->led_pin = led_pin;
17f1de56 Felix Fietkau 2017-11-21 116 dev->led_al = of_property_read_bool(np, "led-active-low");
17f1de56 Felix Fietkau 2017-11-21 117 }
17f1de56 Felix Fietkau 2017-11-21 118
17f1de56 Felix Fietkau 2017-11-21 @119 return devm_led_classdev_register(dev->dev, &dev->led_cdev);
17f1de56 Felix Fietkau 2017-11-21 120 }
17f1de56 Felix Fietkau 2017-11-21 121

:::::: The code at line 119 was first introduced by commit
:::::: 17f1de56df051229988aab37e01971c9713c4a31 mt76: add common code shared between multiple chipsets

:::::: TO: Felix Fietkau <nbd@xxxxxxxx>
:::::: CC: Kalle Valo <kvalo@xxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip