From b5fba2035180b7892f33516aa65851051d32c719 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 1 May 2025 14:11:56 -0700 Subject: [PATCH] linux: remove of_match_ptr from OF only drivers There's no need for it. Kernel update to 6.12 found that it now needs linux/of.h explicitly included. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/18763 Signed-off-by: Robert Marko --- target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c | 2 +- .../ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch | 2 +- .../ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch | 2 +- .../bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c | 4 ++-- .../files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c | 2 +- .../0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c b/target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c index 148157aa7b7..b99a15bb46b 100644 --- a/target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c +++ b/target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c @@ -162,7 +162,7 @@ static struct spi_driver rb4xx_cpld_driver = { .driver = { .name = "rb4xx-cpld", .bus = &spi_bus_type, - .of_match_table = of_match_ptr(rb4xx_cpld_dt_match), + .of_match_table = rb4xx_cpld_dt_match, }, }; diff --git a/target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch b/target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch index 9a315aed0b2..8842f16511b 100644 --- a/target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch +++ b/target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch @@ -200,7 +200,7 @@ Signed-off-by: John Crispin .probe = ar71xx_pci_probe, .driver = { .name = "ar71xx-pci", -+ .of_match_table = of_match_ptr(ar71xx_pci_ids), ++ .of_match_table = ar71xx_pci_ids, }, }; diff --git a/target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch b/target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch index 7927c1cbf5f..b8c106d6ab6 100644 --- a/target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch +++ b/target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch @@ -207,7 +207,7 @@ Signed-off-by: John Crispin .probe = ar724x_pci_probe, .driver = { .name = "ar724x-pci", -+ .of_match_table = of_match_ptr(ar724x_pci_ids), ++ .of_match_table = ar724x_pci_ids, }, }; diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c index c753918e933..ca184e575b2 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6348-enet.c @@ -285,7 +285,7 @@ MODULE_DEVICE_TABLE(of, bcm6348_emac_of_match); static struct platform_driver bcm6348_iudma_driver = { .driver = { .name = "bcm6348-iudma", - .of_match_table = of_match_ptr(bcm6348_iudma_of_match), + .of_match_table = bcm6348_iudma_of_match, }, .probe = bcm6348_iudma_probe, }; @@ -1701,7 +1701,7 @@ MODULE_DEVICE_TABLE(of, bcm6348_emac_of_match); static struct platform_driver bcm6348_emac_driver = { .driver = { .name = "bcm6348-emac", - .of_match_table = of_match_ptr(bcm6348_emac_of_match), + .of_match_table = bcm6348_emac_of_match, }, .probe = bcm6348_emac_probe, .remove_new = bcm6348_emac_remove, diff --git a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c index 456a7f393ec..97ca6a81d84 100644 --- a/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c +++ b/target/linux/bmips/files/drivers/net/ethernet/broadcom/bcm6368-enetsw.c @@ -1133,7 +1133,7 @@ MODULE_DEVICE_TABLE(of, bcm6368_enetsw_of_match); static struct platform_driver bcm6368_enetsw_driver = { .driver = { .name = "bcm6368-enetsw", - .of_match_table = of_match_ptr(bcm6368_enetsw_of_match), + .of_match_table = bcm6368_enetsw_of_match, }, .probe = bcm6368_enetsw_probe, .remove_new = bcm6368_enetsw_remove, diff --git a/target/linux/lantiq/patches-6.6/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-6.6/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index 3ece97052b4..f65959b1de9 100644 --- a/target/linux/lantiq/patches-6.6/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-6.6/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -149,7 +149,7 @@ Signed-off-by: John Crispin +static struct platform_driver ath5k_eeprom_driver = { + .driver = { + .name = "ath5k,eeprom", -+ .of_match_table = of_match_ptr(ath5k_eeprom_ids), ++ .of_match_table = ath5k_eeprom_ids, + }, +}; + -- 2.47.2