From 4d5b3357b934d101909a13fbbda7ca1aec7499e6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 Aug 2026 12:17:33 +0200 Subject: [PATCH] mt76: remove <6.11 compat code It is no longer needed Signed-off-by: Felix Fietkau --- mt76.h | 4 ---- mt7603/soc.c | 11 +---------- mt7615/soc.c | 11 +---------- mt7915/soc.c | 11 +---------- 4 files changed, 3 insertions(+), 34 deletions(-) diff --git a/mt76.h b/mt76.h index f607fb07..1d8da72a 100644 --- a/mt76.h +++ b/mt76.h @@ -21,11 +21,7 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0) -#include -#else #include -#endif #include "util.h" #include "testmode.h" diff --git a/mt7603/soc.c b/mt7603/soc.c index 9b8291d8..b74256ef 100644 --- a/mt7603/soc.c +++ b/mt7603/soc.c @@ -52,21 +52,12 @@ error: return ret; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) -static int -#else -static void -#endif -mt76_wmac_remove(struct platform_device *pdev) +static void mt76_wmac_remove(struct platform_device *pdev) { struct mt76_dev *mdev = platform_get_drvdata(pdev); struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76); mt7603_unregister_device(dev); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) - return 0; -#endif } static const struct of_device_id of_wmac_match[] = { diff --git a/mt7615/soc.c b/mt7615/soc.c index a1840050..4bd189dd 100644 --- a/mt7615/soc.c +++ b/mt7615/soc.c @@ -45,20 +45,11 @@ static int mt7622_wmac_probe(struct platform_device *pdev) return mt7615_mmio_probe(&pdev->dev, mem_base, irq, mt7615e_reg_map); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) -static int -#else -static void -#endif -mt7622_wmac_remove(struct platform_device *pdev) +static void mt7622_wmac_remove(struct platform_device *pdev) { struct mt7615_dev *dev = platform_get_drvdata(pdev); mt7615_unregister_device(dev); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) - return 0; -#endif } static const struct of_device_id mt7622_wmac_of_match[] = { diff --git a/mt7915/soc.c b/mt7915/soc.c index bd195ded..232fa47c 100644 --- a/mt7915/soc.c +++ b/mt7915/soc.c @@ -1283,20 +1283,11 @@ free_device: return ret; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) -static int -#else -static void -#endif -mt798x_wmac_remove(struct platform_device *pdev) +static void mt798x_wmac_remove(struct platform_device *pdev) { struct mt7915_dev *dev = platform_get_drvdata(pdev); mt7915_unregister_device(dev); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) - return 0; -#endif } static const struct of_device_id mt798x_wmac_of_match[] = {