Skip to content

Commit

Permalink
ARM: amba: of: convert to use amba_device_alloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Jan 25, 2012
1 parent d5dc927 commit c0f72f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/of/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
if (!of_device_is_available(node))
return NULL;

dev = kzalloc(sizeof(*dev), GFP_KERNEL);
dev = amba_device_alloc(NULL, 0, 0);
if (!dev)
return NULL;

Expand Down Expand Up @@ -283,14 +283,14 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
if (ret)
goto err_free;

ret = amba_device_register(dev, &iomem_resource);
ret = amba_device_add(dev, &iomem_resource);
if (ret)
goto err_free;

return dev;

err_free:
kfree(dev);
amba_device_put(dev);
return NULL;
}
#else /* CONFIG_ARM_AMBA */
Expand Down

0 comments on commit c0f72f8

Please sign in to comment.