diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 20:59:44 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 20:59:44 +0100 |
commit | dcf81c1af839b77b44404453ecae6e5ac5a75f05 (patch) | |
tree | 289dcbda5fbca34e7e0cf028908b9b517fa8b8b2 /arch/arm/mach-ux500 | |
parent | Merge branches 'debug' and 'idle' into for-armsoc (diff) | |
parent | ARM: amba: samsung: use common amba device initializers (diff) | |
download | linux-dcf81c1af839b77b44404453ecae6e5ac5a75f05.tar.xz linux-dcf81c1af839b77b44404453ecae6e5ac5a75f05.zip |
Merge branch 'amba' into for-armsoc
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/devices-common.c | 13 |
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 c563e5418d80..898a64517b09 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c @@ -26,29 +26,22 @@ dbx500_add_amba_device(const char *name, resource_size_t base, 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; dev->dev.platform_data = pdata; - 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); } |