From: Jeff Garzik 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." ;-) drivers/base/platform.c | 10 +++++----- drivers/i2c/i2c-core.c | 4 ++-- drivers/i2c/i2c-dev.c | 2 +- drivers/scsi/hosts.c | 2 +- include/linux/device.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff -puN drivers/base/platform.c~rename-legacy_bus-to-platform_bus drivers/base/platform.c --- 25/drivers/base/platform.c~rename-legacy_bus-to-platform_bus 2003-12-18 00:46:50.000000000 -0800 +++ 25-akpm/drivers/base/platform.c 2003-12-18 00:46:50.000000000 -0800 @@ -14,8 +14,8 @@ #include #include -struct device legacy_bus = { - .bus_id = "legacy", +struct device platform_bus = { + .bus_id = "platform", }; /** @@ -29,7 +29,7 @@ int platform_device_register(struct plat 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); diff -puN drivers/i2c/i2c-core.c~rename-legacy_bus-to-platform_bus drivers/i2c/i2c-core.c --- 25/drivers/i2c/i2c-core.c~rename-legacy_bus-to-platform_bus 2003-12-18 00:46:50.000000000 -0800 +++ 25-akpm/drivers/i2c/i2c-core.c 2003-12-18 00:46:50.000000000 -0800 @@ -136,10 +136,10 @@ int i2c_add_adapter(struct i2c_adapter * /* 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; diff -puN drivers/i2c/i2c-dev.c~rename-legacy_bus-to-platform_bus drivers/i2c/i2c-dev.c --- 25/drivers/i2c/i2c-dev.c~rename-legacy_bus-to-platform_bus 2003-12-18 00:46:50.000000000 -0800 +++ 25-akpm/drivers/i2c/i2c-dev.c 2003-12-18 00:46:50.000000000 -0800 @@ -447,7 +447,7 @@ static int i2cdev_attach_adapter(struct /* 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; diff -puN drivers/scsi/hosts.c~rename-legacy_bus-to-platform_bus drivers/scsi/hosts.c --- 25/drivers/scsi/hosts.c~rename-legacy_bus-to-platform_bus 2003-12-18 00:46:50.000000000 -0800 +++ 25-akpm/drivers/scsi/hosts.c 2003-12-18 00:46:50.000000000 -0800 @@ -109,7 +109,7 @@ int scsi_add_host(struct Scsi_Host *shos } 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) diff -puN include/linux/device.h~rename-legacy_bus-to-platform_bus include/linux/device.h --- 25/include/linux/device.h~rename-legacy_bus-to-platform_bus 2003-12-18 00:46:50.000000000 -0800 +++ 25-akpm/include/linux/device.h 2003-12-18 00:46:50.000000000 -0800 @@ -372,7 +372,7 @@ extern int platform_device_register(stru 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); _