* [PATCH] arm: prima2: use of_platform_populate instead of of_platform_bus_probe
@ 2013-05-14 9:32 Barry Song
2013-05-15 14:20 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Barry Song @ 2013-05-14 9:32 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com>
---
arch/arm/mach-prima2/common.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index 4f94cd8..bb67b90 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -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)
--
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] arm: prima2: use of_platform_populate instead of of_platform_bus_probe
2013-05-14 9:32 [PATCH] arm: prima2: use of_platform_populate instead of of_platform_bus_probe Barry Song
@ 2013-05-15 14:20 ` Arnd Bergmann
2013-05-15 14:42 ` Barry Song
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2013-05-15 14:20 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 14 May 2013, Barry Song wrote:
>
> 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.
>
> Signed-off-by: Barry Song <Baohua.Song@csr.com>
> Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com>
With 3.10-rc1 and above, you can just remove the sirfsoc_mach_init
function entirely for the same effect.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arm: prima2: use of_platform_populate instead of of_platform_bus_probe
2013-05-15 14:20 ` Arnd Bergmann
@ 2013-05-15 14:42 ` Barry Song
0 siblings, 0 replies; 3+ messages in thread
From: Barry Song @ 2013-05-15 14:42 UTC (permalink / raw)
To: linux-arm-kernel
2013/5/15 Arnd Bergmann <arnd@arndb.de>:
> On Tuesday 14 May 2013, Barry Song wrote:
>>
>> 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.
>>
>> Signed-off-by: Barry Song <Baohua.Song@csr.com>
>> Signed-off-by: Rongjun Ying <Rongjun.Ying@csr.com>
>
> With 3.10-rc1 and above, you can just remove the sirfsoc_mach_init
> function 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;
}
>
> Arnd
-barry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-15 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 9:32 [PATCH] arm: prima2: use of_platform_populate instead of of_platform_bus_probe Barry Song
2013-05-15 14:20 ` Arnd Bergmann
2013-05-15 14:42 ` Barry Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox