aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/devices-common.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-03-15 17:05:52 -0400
committerArnd Bergmann <arnd@arndb.de>2012-03-15 17:05:52 -0400
commit38abdcd0d0689aaca94e740ac67a952c7918caef (patch)
tree83051487c15c3a062eb4dbff16c13e517c309a78 /arch/arm/mach-ux500/devices-common.c
parent709baa67c676a187a63c0f0f40efceb3fb1eef72 (diff)
parent61b80086a525c8a6081257ae40da5dee2bcaee16 (diff)
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,
27 struct amba_device *dev; 27 struct amba_device *dev;
28 int ret; 28 int ret;
29 29
30 dev = kzalloc(sizeof *dev, GFP_KERNEL); 30 dev = amba_device_alloc(name, base, SZ_4K);
31 if (!dev) 31 if (!dev)
32 return ERR_PTR(-ENOMEM); 32 return ERR_PTR(-ENOMEM);
33 33
34 dev->dev.init_name = name;
35
36 dev->res.start = base;
37 dev->res.end = base + SZ_4K - 1;
38 dev->res.flags = IORESOURCE_MEM;
39
40 dev->dma_mask = DMA_BIT_MASK(32); 34 dev->dma_mask = DMA_BIT_MASK(32);
41 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); 35 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
42 36
43 dev->irq[0] = irq; 37 dev->irq[0] = irq;
44 dev->irq[1] = NO_IRQ;
45 38
46 dev->periphid = periphid; 39 dev->periphid = periphid;
47 40
@@ -49,9 +42,9 @@ dbx500_add_amba_device(struct device *parent, const char *name,
49 42
50 dev->dev.parent = parent; 43 dev->dev.parent = parent;
51 44
52 ret = amba_device_register(dev, &iomem_resource); 45 ret = amba_device_add(dev, &iomem_resource);
53 if (ret) { 46 if (ret) {
54 kfree(dev); 47 amba_device_put(dev);
55 return ERR_PTR(ret); 48 return ERR_PTR(ret);
56 } 49 }
57 50