summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/devices-common.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-03-15 22:05:52 +0100
committerArnd Bergmann <arnd@arndb.de>2012-03-15 22:05:52 +0100
commit38abdcd0d0689aaca94e740ac67a952c7918caef (patch)
tree83051487c15c3a062eb4dbff16c13e517c309a78 /arch/arm/mach-ux500/devices-common.c
parentMerge tag 'tegra-soc2' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/... (diff)
parentMerge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux ... (diff)
downloadlinux-38abdcd0d0689aaca94e740ac67a952c7918caef.tar.xz
linux-38abdcd0d0689aaca94e740ac67a952c7918caef.zip
Merge branch 'for-armsoc' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm into next/soc2
Conflicts: arch/arm/mach-tegra/common.c arch/arm/mach-ux500/devices-common.c This resolves two conflicts and lets us merge the exynos5 branch cleanly. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-ux500/devices-common.c')
-rw-r--r--arch/arm/mach-ux500/devices-common.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
index c3bc094c27e5..c5312a4b49f5 100644
--- a/arch/arm/mach-ux500/devices-common.c
+++ b/arch/arm/mach-ux500/devices-common.c
@@ -27,21 +27,14 @@ dbx500_add_amba_device(struct device *parent, const char *name,
struct amba_device *dev;
int ret;
- dev = kzalloc(sizeof *dev, GFP_KERNEL);
+ dev = amba_device_alloc(name, base, SZ_4K);
if (!dev)
return ERR_PTR(-ENOMEM);
- dev->dev.init_name = name;
-
- dev->res.start = base;
- dev->res.end = base + SZ_4K - 1;
- dev->res.flags = IORESOURCE_MEM;
-
dev->dma_mask = DMA_BIT_MASK(32);
dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
dev->irq[0] = irq;
- dev->irq[1] = NO_IRQ;
dev->periphid = periphid;
@@ -49,9 +42,9 @@ dbx500_add_amba_device(struct device *parent, const char *name,
dev->dev.parent = parent;
- ret = amba_device_register(dev, &iomem_resource);
+ ret = amba_device_add(dev, &iomem_resource);
if (ret) {
- kfree(dev);
+ amba_device_put(dev);
return ERR_PTR(ret);
}