diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-04-03 07:11:50 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-04-19 14:31:33 -0400 |
commit | 5002484b8ac93e8d32ca75e8a7504dbb9f7926fe (patch) | |
tree | 8a6a52698ba7d1df5138195b38039370590acb65 /arch/arm/mach-mxs/devices.c | |
parent | 6026aa907b16677d32593c5b7dea134380f51f7f (diff) |
ARM: 7370/2: mxs: factor out dynamic amba device allocator
Replace the local amba device allocator with the core code from
the bus driver.
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-mxs/devices.c')
-rw-r--r-- | arch/arm/mach-mxs/devices.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c index 01faffec306..cf50b5a66dd 100644 --- a/arch/arm/mach-mxs/devices.c +++ b/arch/arm/mach-mxs/devices.c | |||
@@ -75,22 +75,6 @@ err: | |||
75 | return pdev; | 75 | return pdev; |
76 | } | 76 | } |
77 | 77 | ||
78 | int __init mxs_add_amba_device(const struct amba_device *dev) | ||
79 | { | ||
80 | struct amba_device *adev = amba_device_alloc(dev->dev.init_name, | ||
81 | dev->res.start, resource_size(&dev->res)); | ||
82 | |||
83 | if (!adev) { | ||
84 | pr_err("%s: failed to allocate memory", __func__); | ||
85 | return -ENOMEM; | ||
86 | } | ||
87 | |||
88 | adev->irq[0] = dev->irq[0]; | ||
89 | adev->irq[1] = dev->irq[1]; | ||
90 | |||
91 | return amba_device_add(adev, &iomem_resource); | ||
92 | } | ||
93 | |||
94 | struct device mxs_apbh_bus = { | 78 | struct device mxs_apbh_bus = { |
95 | .init_name = "mxs_apbh", | 79 | .init_name = "mxs_apbh", |
96 | .parent = &platform_bus, | 80 | .parent = &platform_bus, |