Commit 8299fdeb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Rename legacy_bus to platform_bus

From: Jeff Garzik <jgarzik@pobox.com>

I've seen this patch floating around.  Not sure the origin, but it's 
surfaced on lkml and also when I was poking around handhelds.org CVS for
iPAQ patches:  on non-PCs, particularly system-on-chip devices but not
just there, you have a custom "platform bus" that is the root of pretty 
much all other devices and buses.

It's something I wanted to make sure people didn't forget; to make sure 
the legacy_bus didn't get "legacied out of existence."  ;-)
parent 99365bd4
......@@ -14,8 +14,8 @@
#include <linux/module.h>
#include <linux/init.h>
struct device legacy_bus = {
.bus_id = "legacy",
struct device platform_bus = {
.bus_id = "platform",
};
/**
......@@ -29,7 +29,7 @@ int platform_device_register(struct platform_device * pdev)
return -EINVAL;
if (!pdev->dev.parent)
pdev->dev.parent = &legacy_bus;
pdev->dev.parent = &platform_bus;
pdev->dev.bus = &platform_bus_type;
......@@ -105,11 +105,11 @@ struct bus_type platform_bus_type = {
int __init platform_bus_init(void)
{
device_register(&legacy_bus);
device_register(&platform_bus);
return bus_register(&platform_bus_type);
}
EXPORT_SYMBOL(legacy_bus);
EXPORT_SYMBOL(platform_bus);
EXPORT_SYMBOL(platform_bus_type);
EXPORT_SYMBOL(platform_device_register);
EXPORT_SYMBOL(platform_device_unregister);
......@@ -136,10 +136,10 @@ int i2c_add_adapter(struct i2c_adapter *adap)
/* Add the adapter to the driver core.
* If the parent pointer is not set up,
* we add this adapter to the legacy bus.
* we add this adapter to the host bus.
*/
if (adap->dev.parent == NULL)
adap->dev.parent = &legacy_bus;
adap->dev.parent = &platform_bus;
sprintf(adap->dev.bus_id, "i2c-%d", adap->nr);
adap->dev.driver = &i2c_adapter_driver;
adap->dev.release = &i2c_adapter_dev_release;
......
......@@ -447,7 +447,7 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap)
/* register this i2c device with the driver core */
i2c_dev->adap = adap;
if (adap->dev.parent == &legacy_bus)
if (adap->dev.parent == &platform_bus)
i2c_dev->class_dev.dev = &adap->dev;
else
i2c_dev->class_dev.dev = adap->dev.parent;
......
......@@ -109,7 +109,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
}
if (!shost->shost_gendev.parent)
shost->shost_gendev.parent = dev ? dev : &legacy_bus;
shost->shost_gendev.parent = dev ? dev : &platform_bus;
error = device_add(&shost->shost_gendev);
if (error)
......
......@@ -372,7 +372,7 @@ extern int platform_device_register(struct platform_device *);
extern void platform_device_unregister(struct platform_device *);
extern struct bus_type platform_bus_type;
extern struct device legacy_bus;
extern struct device platform_bus;
/* drivers/base/power.c */
extern void device_shutdown(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment