Skip to content

Commit fc520f8

Browse files
haokexinrobherring
authored andcommitted
of/platform: disable the of_platform_default_populate_init() for all the ppc boards
With the commit 44a7185 ("of/platform: Add common method to populate default bus"), a default function is introduced to populate the default bus and this function is invoked at the arch_initcall_sync level. But a lot of ppc boards use machine_device_initcall() to populate the default bus. This means that the default populate function has higher priority and would override the arch specific population of the bus. The side effect is that some arch specific bus are not probed, then cause various malfunction due to the miss of some devices. Since it is very possible to introduce bugs if we simply change the initcall level for all these boards(about 30+). This just disable this default function for all the ppc boards. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent 255c039 commit fc520f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/of/platform.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ int of_platform_default_populate(struct device_node *root,
497497
}
498498
EXPORT_SYMBOL_GPL(of_platform_default_populate);
499499

500+
#ifndef CONFIG_PPC
500501
static int __init of_platform_default_populate_init(void)
501502
{
502503
struct device_node *node;
@@ -521,6 +522,7 @@ static int __init of_platform_default_populate_init(void)
521522
return 0;
522523
}
523524
arch_initcall_sync(of_platform_default_populate_init);
525+
#endif
524526

525527
static int of_platform_device_destroy(struct device *dev, void *data)
526528
{

0 commit comments

Comments
 (0)