aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-06-08 09:48:21 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-07-24 11:57:51 -0400
commiteca3930163ba8884060ce9d9ff5ef0d9b7c7b00f (patch)
tree5774d6d53b5f7d8f069e82b3937cdff7b3d45bbe /arch/microblaze
parent05212157e94ccf4cf458413bbba509cfa95ff92b (diff)
of: Merge of_platform_bus_type with platform_bus_type
of_platform_bus was being used in the same manner as the platform_bus. The only difference being that of_platform_bus devices are generated from data in the device tree, and platform_bus devices are usually statically allocated in platform code. Having them separate causes the problem of device drivers having to be registered twice if it was possible for the same device to appear on either bus. This patch removes of_platform_bus_type and registers all of_platform bus devices and drivers on the platform bus instead. A previous patch made the of_device structure an alias for the platform_device structure, and a shim is used to adapt of_platform_drivers to the platform bus. After all of of_platform_bus drivers are converted to be normal platform drivers, the shim code can be removed. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/kernel/of_platform.c11
-rw-r--r--arch/microblaze/kernel/setup.c6
2 files changed, 0 insertions, 17 deletions
diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c
index da79edf45420..fb2866104331 100644
--- a/arch/microblaze/kernel/of_platform.c
+++ b/arch/microblaze/kernel/of_platform.c
@@ -26,17 +26,6 @@
26#include <linux/topology.h> 26#include <linux/topology.h>
27#include <asm/atomic.h> 27#include <asm/atomic.h>
28 28
29struct bus_type of_platform_bus_type = {
30 .uevent = of_device_uevent,
31};
32EXPORT_SYMBOL(of_platform_bus_type);
33
34static int __init of_bus_driver_init(void)
35{
36 return of_bus_type_init(&of_platform_bus_type, "of_platform");
37}
38postcore_initcall(of_bus_driver_init);
39
40/* 29/*
41 * The list of OF IDs below is used for matching bus types in the 30 * The list of OF IDs below is used for matching bus types in the
42 * system whose devices are to be exposed as of_platform_devices. 31 * system whose devices are to be exposed as of_platform_devices.
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 17c98dbcec88..f5f768842354 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -213,15 +213,9 @@ static struct notifier_block dflt_plat_bus_notifier = {
213 .priority = INT_MAX, 213 .priority = INT_MAX,
214}; 214};
215 215
216static struct notifier_block dflt_of_bus_notifier = {
217 .notifier_call = dflt_bus_notify,
218 .priority = INT_MAX,
219};
220
221static int __init setup_bus_notifier(void) 216static int __init setup_bus_notifier(void)
222{ 217{
223 bus_register_notifier(&platform_bus_type, &dflt_plat_bus_notifier); 218 bus_register_notifier(&platform_bus_type, &dflt_plat_bus_notifier);
224 bus_register_notifier(&of_platform_bus_type, &dflt_of_bus_notifier);
225 219
226 return 0; 220 return 0;
227} 221}