From 2df5be105f11812a67dd719bec99f90fedbbba19 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 18 Dec 2011 11:23:25 +0000 Subject: [PATCH] --- yaml --- r: 295344 b: refs/heads/master c: 039e7ad89211a63d98341e4add4fc6720f383c2a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-mxs/devices.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index e11e20e0431c..fc883680f17c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9a25706b71ea06c3e2cfd165ebf98a5557ecdd0e +refs/heads/master: 039e7ad89211a63d98341e4add4fc6720f383c2a diff --git a/trunk/arch/arm/mach-mxs/devices.c b/trunk/arch/arm/mach-mxs/devices.c index fe3e847930c9..01faffec3064 100644 --- a/trunk/arch/arm/mach-mxs/devices.c +++ b/trunk/arch/arm/mach-mxs/devices.c @@ -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 = {