Skip to contentSkip to conversation

h8300: remove unnecessary of_platform_populate call

PATCH In review Rob Herring 2 participants 3 messages Jun 19, 2018 – Jul 22, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 h8300: remove unnecessary of_platform_populate call

The DT core will call of_platform_populate, so it is not necessary for arch specific code to call it unless there are custom match entries, auxdata or parent device. Neither of those apply here, so remove the call.

---
 arch/h8300/kernel/setup.c | 10 ----------
 1 file changed, 10 deletions(-)
arch/h8300/kernel/setup.c +0 -10
index a4d0470c10a9..b2b51f75774e 100644
@@ -23,7 +23,6 @@
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_fdt.h>
-#include <linux/of_platform.h>
 #include <linux/of_address.h>
 #include <linux/clk-provider.h>
 #include <linux/memblock.h>
@@ -188,15 +187,6 @@ const struct seq_operations cpuinfo_op = {
 	.show	= show_cpuinfo,
 };
 
-static int __init device_probe(void)
-{
-	of_platform_populate(NULL, NULL, NULL, NULL);
-
-	return 0;
-}
-
-device_initcall(device_probe);
-
 #if defined(CONFIG_CPU_H8300H)
 #define get_wait(base, addr) ({		\
 	int baddr;			\
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · Rob Herring

The DT core will call of_platform_populate, so it is not necessary for arch specific code to call it unless there are custom match entries, auxdata or parent device. Neither of those apply here, so remove the call.

---
 arch/h8300/kernel/setup.c | 10 ----------
 1 file changed, 10 deletions(-)

Ping?

Quoted 32 lines
arch/h8300/kernel/setup.c +0 -11
index a4d0470c10a9..b2b51f75774e 100644
@@ -23,7 +23,6 @@
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_fdt.h>
-#include <linux/of_platform.h>
 #include <linux/of_address.h>
 #include <linux/clk-provider.h>
 #include <linux/memblock.h>
@@ -188,15 +187,6 @@ const struct seq_operations cpuinfo_op = {
        .show   = show_cpuinfo,
 };
 
-static int __init device_probe(void)
-{
-       of_platform_populate(NULL, NULL, NULL, NULL);
-
-       return 0;
-}
-
-device_initcall(device_probe);
-
 #if defined(CONFIG_CPU_H8300H)
 #define get_wait(base, addr) ({                \
        int baddr;                      \
--

2.17.1

#2 lore raw
In reply to Rob Herring
Quoted 43 lines · Rob Herring

The DT core will call of_platform_populate, so it is not necessary for arch specific code to call it unless there are custom match entries, auxdata or parent device. Neither of those apply here, so remove the call.

---
 arch/h8300/kernel/setup.c | 10 ----------
 1 file changed, 10 deletions(-)
arch/h8300/kernel/setup.c +0 -10
index a4d0470c10a9..b2b51f75774e 100644
@@ -23,7 +23,6 @@
 #include <linux/init.h>
 #include <linux/of.h>
 #include <linux/of_fdt.h>
-#include <linux/of_platform.h>
 #include <linux/of_address.h>
 #include <linux/clk-provider.h>
 #include <linux/memblock.h>
@@ -188,15 +187,6 @@ const struct seq_operations cpuinfo_op = {
 	.show	= show_cpuinfo,
 };
 
-static int __init device_probe(void)
-{
-	of_platform_populate(NULL, NULL, NULL, NULL);
-
-	return 0;
-}
-
-device_initcall(device_probe);
-
 #if defined(CONFIG_CPU_H8300H)
 #define get_wait(base, addr) ({		\
 	int baddr;			\
Signature · 1 line
2.17.1

Sorry. too late reply.
Applied to h8300-next.
Thanks.

Signature · 1 line
Yosinori Sato