arm: prima2: use of_platform_populate instead of of_platform_bus_probe
Subsystems (2)
PATCH 1/1 arm: prima2: use of_platform_populate instead of of_platform_bus_probe
use of_platform_populate to populate platform devices, it is suitable for creating devices which are children of the root node, then makes things like pcm work.
--- arch/arm/mach-prima2/common.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-)
arch/arm/mach-prima2/common.c +1 -6
@@ -17,14 +17,9 @@#include <linux/of_platform.h> #include "common.h" -static struct of_device_id sirfsoc_of_bus_ids[]__initdata = { - { .compatible ="simple-bus" , }, - {}, -}; -void __init sirfsoc_mach_init (void ) { -of_platform_bus_probe (NULL , sirfsoc_of_bus_ids,NULL ); +of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); }void __init sirfsoc_init_late (void )
Signature · 6 lines
1.7.4.1 Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
PATCH 1/1 arm: prima2: use of_platform_populate instead of of_platform_bus_probe
Quoted 7 lines · Barry Song
use
of_platform_populateto populate platform devices, it is suitable for creating devices which are children of the root node, then makes things like pcm work.Signed-off-by Barry Song <[email protected]>Signed-off-by Rongjun Ying <[email protected]>
With 3.10-rc1 and above, you can just remove the sirfsoc_mach_init function entirely for the same effect.
Arnd
PATCH 1/1 arm: prima2: use of_platform_populate instead of of_platform_bus_probe
2013/5/15 Arnd Bergmann <[email protected]>:
Quoted 11 lines · Barry Song
Quoted 7 lines
use
of_platform_populateto populate platform devices, it is suitable for creating devices which are children of the root node, then makes things like pcm work.Signed-off-by Barry Song <[email protected]>Signed-off-by Rongjun Ying <[email protected]>With 3.10-rc1 and above, you can just remove the
sirfsoc_mach_initfunction entirely for the same effect.
ok. since kernel/setup.c does:
static int __init customize_machine(void)
{
/*
* customizes platform devices, or adds new ones
* On DT based machines, we fall back to populating the
* machine from the device tree, if no callback is provided,
* otherwise we would always need an init_machine callback. */
if (machine_desc->init_machine)
machine_desc->init_machine();
#ifdef CONFIG_OF
else
of_platform_populate(NULL, of_default_bus_match_table,
NULL, NULL);
#endif
return 0;
}Quoted 2 lines
Arnd
-barry