diff --git a/mt7603/soc.c b/mt7603/soc.c index ba927033..0587fce6 100644 --- a/mt7603/soc.c +++ b/mt7603/soc.c @@ -52,7 +52,11 @@ 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) { struct mt76_dev *mdev = platform_get_drvdata(pdev); @@ -60,7 +64,9 @@ mt76_wmac_remove(struct platform_device *pdev) 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 f13d1b41..def3cd7a 100644 --- a/mt7615/soc.c +++ b/mt7615/soc.c @@ -45,13 +45,20 @@ static int mt7622_wmac_probe(struct platform_device *pdev) return mt7615_mmio_probe(&pdev->dev, mem_base, irq, mt7615e_reg_map); } -static int mt7622_wmac_remove(struct platform_device *pdev) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) +static int +#else +static void +#endif +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 92d8d710..ce9371de 100644 --- a/mt7915/soc.c +++ b/mt7915/soc.c @@ -1283,13 +1283,20 @@ free_device: return ret; } -static int mt798x_wmac_remove(struct platform_device *pdev) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6,11,0) +static int +#else +static void +#endif +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[] = {