Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295344
b: refs/heads/master
c: 039e7ad
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Jan 25, 2012
1 parent 2653c57 commit 2df5be1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 9a25706b71ea06c3e2cfd165ebf98a5557ecdd0e
refs/heads/master: 039e7ad89211a63d98341e4add4fc6720f383c2a
8 changes: 5 additions & 3 deletions trunk/arch/arm/mach-mxs/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,18 @@ struct platform_device *__init mxs_add_platform_device_dmamask(

int __init mxs_add_amba_device(const struct amba_device *dev)
{
struct amba_device *adev = kmalloc(sizeof(*adev), GFP_KERNEL);
struct amba_device *adev = amba_device_alloc(dev->dev.init_name,
dev->res.start, resource_size(&dev->res));

if (!adev) {
pr_err("%s: failed to allocate memory", __func__);
return -ENOMEM;
}

*adev = *dev;
adev->irq[0] = dev->irq[0];
adev->irq[1] = dev->irq[1];

return amba_device_register(adev, &iomem_resource);
return amba_device_add(adev, &iomem_resource);
}

struct device mxs_apbh_bus = {
Expand Down

0 comments on commit 2df5be1

Please sign in to comment.