Skip to content

Commit c5a3bd9

Browse files
mbc07nbd168
authored andcommitted
wifi: mt76: pass LED define via ccflags-y in driver submodules
Commit d2b01fb ("mt76: pass LED define via ccflags-y") converted the top-level Makefile from the deprecated EXTRA_CFLAGS to ccflags-y so that -DCONFIG_MT76_LEDS keeps working now that kbuild no longer honours EXTRA_CFLAGS. However, ccflags-y (like EXTRA_CFLAGS before it) only applies to the kbuild makefile it is set in and is not inherited by subdirectories pulled in via obj-y/obj-m. The mt7603, mt7615 and mt7915 driver subdirectories each set their own "EXTRA_CFLAGS += ... -DCONFIG_MT76_LEDS", which is now a silent no-op. As a result CONFIG_MT76_LEDS is undefined when building mt7603/init.c, mt7615/init.c, mt7615/pci_init.c and mt7915/init.c, the IS_ENABLED(CONFIG_MT76_LEDS) blocks are compiled out, and the mt76-* LED class devices are never registered for these drivers. Convert these subdirectory Makefiles to ccflags-y as well. mt7996/Makefile never carried the define at all, even though mt7996/init.c has the same IS_ENABLED(CONFIG_MT76_LEDS) checks for its LED callbacks and GPIO mux setup. Add ccflags-y there too so mt7996 LED support is enabled consistently with the other drivers. mt76x0, mt76x2, mt7921 and mt7925 contain no CONFIG_MT76_LEDS references and are left untouched. Fixes: d2b01fb ("mt76: pass LED define via ccflags-y") Link: #1077 Signed-off-by: Mateus B. Cassiano <mbc07@live.com>
1 parent 254a344 commit c5a3bd9

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

mt7603/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: BSD-3-Clause-Clear
2-
EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS
2+
ccflags-y += -Werror -DCONFIG_MT76_LEDS
33
obj-m += mt7603e.o
44

55
mt7603e-y := \

mt7615/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause-Clear
22

3-
EXTRA_CFLAGS += -DCONFIG_MT76_LEDS
3+
ccflags-y += -DCONFIG_MT76_LEDS
44
obj-$(CONFIG_MT7615_COMMON) += mt7615-common.o
55
obj-$(CONFIG_MT7615E) += mt7615e.o
66
obj-$(CONFIG_MT7663_USB_SDIO_COMMON) += mt7663-usb-sdio-common.o

mt7915/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause-Clear
22

3-
EXTRA_CFLAGS += -DCONFIG_MT76_LEDS
3+
ccflags-y += -DCONFIG_MT76_LEDS
44
obj-$(CONFIG_MT7915E) += mt7915e.o
55

66
mt7915e-y := pci.o init.o dma.o eeprom.o main.o mcu.o mac.o \

mt7996/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: BSD-3-Clause-Clear
22

3+
ccflags-y += -DCONFIG_MT76_LEDS
34
obj-$(CONFIG_MT7996E) += mt7996e.o
45

56
mt7996e-y := pci.o init.o dma.o eeprom.o main.o mcu.o mac.o \

0 commit comments

Comments
 (0)