aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/platform.c
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 /drivers/base/platform.c
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 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index fac3633c7223..f699fabf403b 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -636,6 +636,12 @@ static struct device_attribute platform_dev_attrs[] = {
636static int platform_uevent(struct device *dev, struct kobj_uevent_env *env) 636static int platform_uevent(struct device *dev, struct kobj_uevent_env *env)
637{ 637{
638 struct platform_device *pdev = to_platform_device(dev); 638 struct platform_device *pdev = to_platform_device(dev);
639 int rc;
640
641 /* Some devices have extra OF data and an OF-style MODALIAS */
642 rc = of_device_uevent(dev,env);
643 if (rc != -ENODEV)
644 return rc;
639 645
640 add_uevent_var(env, "MODALIAS=%s%s", PLATFORM_MODULE_PREFIX, 646 add_uevent_var(env, "MODALIAS=%s%s", PLATFORM_MODULE_PREFIX,
641 (pdev->id_entry) ? pdev->id_entry->name : pdev->name); 647 (pdev->id_entry) ? pdev->id_entry->name : pdev->name);