diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-02-03 12:32:26 +0100 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-02-03 12:32:26 +0100 |
commit | 57225b76864210d667b935c54babf22b6c31336b (patch) | |
tree | cce7eab28de00a88d75b8eda704f5838e10947b1 /arch/arm/mach-ux500/devices-common.c | |
parent | Linux 3.3-rc2 (diff) | |
parent | Merge branch 'amba' into for-armsoc (diff) | |
download | linux-57225b76864210d667b935c54babf22b6c31336b.tar.xz linux-57225b76864210d667b935c54babf22b6c31336b.zip |
Merge remote-tracking branch 'armsoc/depends/rmk/for-armsoc' into at91-3.4-base
Conflicts:
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91sam9g45.c
Diffstat (limited to 'arch/arm/mach-ux500/devices-common.c')
-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); } |