From 08956a0e8a697edb566766536b2fbbb168ac6ecc Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 3 Apr 2012 12:00:18 +0100 Subject: ARM: 7372/1: ux500: factor out dynamic amba device allocator This replaces the dynamic device allocator in the ux500 machine with the common device allocator in the bus code. Cc: Srinidhi Kasagar Cc: Rabin Vincent Signed-off-by: Linus Walleij Signed-off-by: Russell King --- arch/arm/mach-ux500/devices-common.c | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'arch/arm/mach-ux500/devices-common.c') diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c index c5312a4b49f5..dfdd4a54668d 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c @@ -11,7 +11,6 @@ #include #include #include -#include #include @@ -19,38 +18,6 @@ #include "devices-common.h" -struct amba_device * -dbx500_add_amba_device(struct device *parent, const char *name, - resource_size_t base, int irq, void *pdata, - unsigned int periphid) -{ - struct amba_device *dev; - int ret; - - dev = amba_device_alloc(name, base, SZ_4K); - if (!dev) - return ERR_PTR(-ENOMEM); - - dev->dma_mask = DMA_BIT_MASK(32); - dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); - - dev->irq[0] = irq; - - dev->periphid = periphid; - - dev->dev.platform_data = pdata; - - dev->dev.parent = parent; - - ret = amba_device_add(dev, &iomem_resource); - if (ret) { - amba_device_put(dev); - return ERR_PTR(ret); - } - - return dev; -} - static struct platform_device * dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq, struct nmk_gpio_platform_data *pdata) -- cgit v1.2.3