diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-18 06:45:17 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-25 06:02:01 -0500 |
commit | c0f72f8a9279f82520fc476c32c09f693661c5f4 (patch) | |
tree | e22e2234b79411ac95f711a266a2614ed36fcd0e /drivers/of/platform.c | |
parent | d5dc9271b25822f36d299f8cab985379743424b9 (diff) |
ARM: amba: of: convert to use amba_device_alloc
Convert DT code to use the new amba_device_alloc APIs.
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r-- | drivers/of/platform.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 63b3ec48c203..cae9477a6ed3 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -253,7 +253,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node, | |||
253 | if (!of_device_is_available(node)) | 253 | if (!of_device_is_available(node)) |
254 | return NULL; | 254 | return NULL; |
255 | 255 | ||
256 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); | 256 | dev = amba_device_alloc(NULL, 0, 0); |
257 | if (!dev) | 257 | if (!dev) |
258 | return NULL; | 258 | return NULL; |
259 | 259 | ||
@@ -283,14 +283,14 @@ static struct amba_device *of_amba_device_create(struct device_node *node, | |||
283 | if (ret) | 283 | if (ret) |
284 | goto err_free; | 284 | goto err_free; |
285 | 285 | ||
286 | ret = amba_device_register(dev, &iomem_resource); | 286 | ret = amba_device_add(dev, &iomem_resource); |
287 | if (ret) | 287 | if (ret) |
288 | goto err_free; | 288 | goto err_free; |
289 | 289 | ||
290 | return dev; | 290 | return dev; |
291 | 291 | ||
292 | err_free: | 292 | err_free: |
293 | kfree(dev); | 293 | amba_device_put(dev); |
294 | return NULL; | 294 | return NULL; |
295 | } | 295 | } |
296 | #else /* CONFIG_ARM_AMBA */ | 296 | #else /* CONFIG_ARM_AMBA */ |