Commit e75420f7 authored by Russell King's avatar Russell King

[ARM] Fix platform device registration.

Since the platform device registration is now merged into the driver
model, remove it from the ARM specific code.
parent 9b89634d
......@@ -2,7 +2,6 @@
# Makefile for the linux kernel.
#
obj-y += platform.o
obj-$(CONFIG_ARM_AMBA) += amba.o
obj-$(CONFIG_ICST525) += icst525.o
obj-$(CONFIG_SA1111) += sa1111.o
......
#include <linux/ioport.h>
#include <linux/device.h>
#include <linux/init.h>
int __init platform_add_device(struct platform_device *dev)
{
int i;
for (i = 0; i < dev->num_resources; i++) {
struct resource *r = &dev->resource[i];
r->name = dev->dev.bus_id;
if (r->flags & IORESOURCE_MEM &&
request_resource(&iomem_resource, r)) {
printk(KERN_ERR
"%s%d: failed to claim resource %d\n",
dev->name, dev->id, i);
break;
}
}
if (i == dev->num_resources)
platform_device_register(dev);
return 0;
}
int __init platform_add_devices(struct platform_device **devs, int num)
{
int i;
for (i = 0; i < num; i++)
platform_add_device(devs[i]);
return 0;
}
......@@ -256,7 +256,7 @@ static void __init ap_init(void)
unsigned long sc_dec;
int i;
platform_add_device(&cfi_flash_device);
platform_device_register(&cfi_flash_device);
sc_dec = readl(VA_SC_BASE + INTEGRATOR_SC_DEC_OFFSET);
for (i = 0; i < 4; i++) {
......
......@@ -503,8 +503,8 @@ static void __init versatile_init(void)
{
int i;
platform_add_device(&versatile_flash_device);
platform_add_device(&smc91x_device);
platform_device_register(&versatile_flash_device);
platform_device_register(&smc91x_device);
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i];
......
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