Commit Message

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>
---
arch/microblaze/kernel/of_platform.c | 11 -----
arch/microblaze/kernel/setup.c | 6 ---
arch/powerpc/kernel/dma-swiotlb.c | 8 ----
arch/powerpc/kernel/of_platform.c | 12 -----
arch/powerpc/kernel/setup-common.c | 7 ---
arch/powerpc/platforms/cell/beat_iommu.c | 2 -
arch/powerpc/platforms/cell/iommu.c | 2 -
arch/powerpc/sysdev/mv64x60_dev.c | 7 ---
arch/sparc/kernel/of_device_32.c | 21 ++-------
arch/sparc/kernel/of_device_64.c | 21 ++-------
arch/sparc/kernel/of_device_common.c | 3 -
drivers/base/platform.c | 6 +++
drivers/of/device.c | 5 ++
drivers/of/platform.c | 67 +++++++++++++++++++++++++++++-
include/linux/of_device.h | 6 +++
include/linux/of_platform.h | 21 ++++-----
16 files changed, 102 insertions(+), 103 deletions(-)

Comments

From: Grant Likely <grant.likely@secretlab.ca>
Date: Wed, 21 Jul 2010 17:40:00 -0600
> 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>