Skip to content

Commit c9479d4

Browse files
namiltdhauke
authored andcommitted
mt76: pass LED define via ccflags-y
Replace the deprecated EXTRA_CFLAGS with ccflags-y so that the -DCONFIG_MT76_LEDS define is applied correctly by the kernel build system. EXTRA_CFLAGS is no longer honored by recent kbuilds[1]; ccflags-y is the supported variable and works on kernels 6.12 and 6.18. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.20&id=f77bf01425b11947eeb3b5b54685212c302741b8 Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Link: openwrt/openwrt#22737 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
1 parent 10e32b9 commit c9479d4

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2+
Date: Thu, 2 Apr 2026 19:01:10 +0200
3+
Subject: Subject: [PATCH] mt76: pass LED define via ccflags-y
4+
5+
Replace the deprecated EXTRA_CFLAGS with ccflags-y so that
6+
the -DCONFIG_MT76_LEDS define is applied correctly by the kernel
7+
build system. EXTRA_CFLAGS is no longer honored by recent
8+
kbuilds[1]; ccflags-y is the supported variable and works
9+
on kernels 6.12 and 6.18.
10+
11+
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.20&id=f77bf01425b11947eeb3b5b54685212c302741b8
12+
13+
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
14+
---
15+
Makefile | 2 +-
16+
1 file changed, 1 insertion(+), 1 deletion(-)
17+
18+
--- a/Makefile
19+
+++ b/Makefile
20+
@@ -1,5 +1,5 @@
21+
# SPDX-License-Identifier: BSD-3-Clause-Clear
22+
-EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS
23+
+ccflags-y += -Werror -DCONFIG_MT76_LEDS
24+
obj-m := mt76.o
25+
obj-$(CONFIG_MT76_USB) += mt76-usb.o
26+
obj-$(CONFIG_MT76_SDIO) += mt76-sdio.o

0 commit comments

Comments
 (0)