[openwrt/openwrt] mpc85xx: replace probe with compatible
LEDE Commits
lede-commits at lists.infradead.org
Sat Sep 7 13:24:12 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/078cade9f8eb7260d5cf4baac1a97bd416634b68
commit 078cade9f8eb7260d5cf4baac1a97bd416634b68
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Fri Sep 6 15:08:18 2024 -0700
mpc85xx: replace probe with compatible
Upstream commit does this for simple cases, which all of these are.
Commit: 1c96fcdef8c7492ecf34ed70102a1ae5253ef9d1
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16345
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
.../mpc85xx/files/arch/powerpc/platforms/85xx/br200-wp.c | 13 +------------
.../mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c | 13 +------------
.../mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c | 13 +------------
.../mpc85xx/files/arch/powerpc/platforms/85xx/msm460.c | 13 +------------
.../linux/mpc85xx/files/arch/powerpc/platforms/85xx/panda.c | 13 +------------
.../mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c | 13 +------------
.../files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c | 13 +------------
.../mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3710i.c | 13 +------------
.../mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c | 13 +------------
.../mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c | 13 +------------
10 files changed, 10 insertions(+), 120 deletions(-)
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/br200-wp.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/br200-wp.c
index 23fd11a5c6..86a925df23 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/br200-wp.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/br200-wp.c
@@ -13,7 +13,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -57,19 +56,9 @@ static void __init br200_wp_setup_arch(void)
machine_arch_initcall(br200_wp, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init br200_wp_probe(void)
-{
- if (of_machine_is_compatible("aerohive,br200-wp"))
- return 1;
- return 0;
-}
-
define_machine(br200_wp) {
.name = "P1020 RDB",
- .probe = br200_wp_probe,
+ .compatible = "aerohive,br200-wp",
.setup_arch = br200_wp_setup_arch,
.init_IRQ = br200_wp_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c
index 422bde6903..27a3ef2e86 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/firebox_t10.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -62,19 +61,9 @@ static void __init firebox_t10_setup_arch(void)
machine_arch_initcall(firebox_t10, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init firebox_t10_probe(void)
-{
- if (of_machine_is_compatible("watchguard,firebox-t10"))
- return 1;
- return 0;
-}
-
define_machine(firebox_t10) {
.name = "P1010 RDB",
- .probe = firebox_t10_probe,
+ .compatible = "watchguard,firebox-t10",
.setup_arch = firebox_t10_setup_arch,
.init_IRQ = firebox_t10_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c
index f325b32ce6..b5ee3e646b 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/hiveap-330.c
@@ -18,7 +18,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -64,19 +63,9 @@ static void __init hiveap_330_setup_arch(void)
machine_arch_initcall(hiveap_330, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init hiveap_330_probe(void)
-{
- if (of_machine_is_compatible("aerohive,hiveap-330"))
- return 1;
- return 0;
-}
-
define_machine(hiveap_330) {
.name = "P1020 RDB",
- .probe = hiveap_330_probe,
+ .compatible = "aerohive,hiveap-330",
.setup_arch = hiveap_330_setup_arch,
.init_IRQ = hiveap_330_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/msm460.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/msm460.c
index a4f547d313..f7324406e9 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/msm460.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/msm460.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -66,19 +65,9 @@ static void __init msm_setup_arch(void)
machine_arch_initcall(msm, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init msm_probe(void)
-{
- if (of_machine_is_compatible("hpe,msm460"))
- return 1;
- return 0;
-}
-
define_machine(msm) {
.name = "P1020 RDB",
- .probe = msm_probe,
+ .compatible = "hpe,msm460",
.setup_arch = msm_setup_arch,
.init_IRQ = msm_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/panda.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/panda.c
index 7eec2cf15c..5b8b3e8217 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/panda.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/panda.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -66,19 +65,9 @@ static void __init panda_setup_arch(void)
machine_arch_initcall(panda, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init panda_probe(void)
-{
- if (of_machine_is_compatible("ocedo,panda"))
- return 1;
- return 0;
-}
-
define_machine(panda) {
.name = "P1020 RDB",
- .probe = panda_probe,
+ .compatible = "ocedo,panda",
.setup_arch = panda_setup_arch,
.init_IRQ = panda_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c
index 1b2be853a5..6e6e3aa724 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -62,19 +61,9 @@ static void __init red_15w_rev1_setup_arch(void)
machine_arch_initcall(red_15w_rev1, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init red_15w_rev1_probe(void)
-{
- if (of_machine_is_compatible("sophos,red-15w-rev1"))
- return 1;
- return 0;
-}
-
define_machine(red_15w_rev1) {
.name = "P1010 RDB",
- .probe = red_15w_rev1_probe,
+ .compatible = "sophos,red-15w-rev1",
.setup_arch = red_15w_rev1_setup_arch,
.init_IRQ = red_15w_rev1_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c
index b430a12ee4..c259b09414 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c
@@ -18,7 +18,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -59,19 +58,9 @@ static void __init tl_wdr4900_v1_setup_arch(void)
machine_arch_initcall(tl_wdr4900_v1, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init tl_wdr4900_v1_probe(void)
-{
- if (of_machine_is_compatible("tplink,tl-wdr4900-v1"))
- return 1;
- return 0;
-}
-
define_machine(tl_wdr4900_v1) {
.name = "Freescale P1014",
- .probe = tl_wdr4900_v1_probe,
+ .compatible = "tplink,tl-wdr4900-v1",
.setup_arch = tl_wdr4900_v1_setup_arch,
.init_IRQ = tl_wdr4900_v1_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3710i.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3710i.c
index f23902de39..0be0165473 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3710i.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3710i.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -66,19 +65,9 @@ static void __init ws_ap3710i_setup_arch(void)
machine_arch_initcall(ws_ap3710i, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init ws_ap3710i_probe(void)
-{
- if (of_machine_is_compatible("enterasys,ws-ap3710i"))
- return 1;
- return 0;
-}
-
define_machine(ws_ap3710i) {
.name = "P1020 RDB",
- .probe = ws_ap3710i_probe,
+ .compatible = "enterasys,ws-ap3710i",
.setup_arch = ws_ap3710i_setup_arch,
.init_IRQ = ws_ap3710i_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c
index aa2a366b3d..367bb7a794 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3715i.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -62,19 +61,9 @@ static void __init wsap3715i_setup_arch(void)
machine_arch_initcall(wsap3715i, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init wsap3715i_probe(void)
-{
- if (of_machine_is_compatible("enterasys,ws-ap3715i"))
- return 1;
- return 0;
-}
-
define_machine(wsap3715i) {
.name = "P1010 RDB",
- .probe = wsap3715i_probe,
+ .compatible = "enterasys,ws-ap3715i",
.setup_arch = wsap3715i_setup_arch,
.init_IRQ = wsap3715i_pic_init,
#ifdef CONFIG_PCI
diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c
index 5a0919c200..2c285e0e85 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c
+++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c
@@ -20,7 +20,6 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
-#include <linux/of_platform.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -66,19 +65,9 @@ static void __init ws_ap3825i_setup_arch(void)
machine_arch_initcall(ws_ap3825i, mpc85xx_common_publish_devices);
-/*
- * Called very early, device-tree isn't unflattened
- */
-static int __init ws_ap3825i_probe(void)
-{
- if (of_machine_is_compatible("extreme-networks,ws-ap3825i"))
- return 1;
- return 0;
-}
-
define_machine(ws_ap3825i) {
.name = "P1020 RDB",
- .probe = ws_ap3825i_probe,
+ .compatible = "extreme-networks,ws-ap3825i",
.setup_arch = ws_ap3825i_setup_arch,
.init_IRQ = ws_ap3825i_pic_init,
#ifdef CONFIG_PCI
More information about the lede-commits
mailing list