Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295342
b: refs/heads/master
c: 46d4bb9
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Jan 25, 2012
1 parent 94077c4 commit 87ce715
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0f72f8a9279f82520fc476c32c09f693661c5f4
refs/heads/master: 46d4bb9b52829c7d94c528201f27f6288be3f45e
12 changes: 3 additions & 9 deletions trunk/arch/arm/mach-ux500/devices-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,10 @@ 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);

Expand All @@ -46,9 +40,9 @@ dbx500_add_amba_device(const char *name, resource_size_t base,

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);
}

Expand Down

0 comments on commit 87ce715

Please sign in to comment.