mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ARM: amba: of: convert to use amba_device_alloc
Convert DT code to use the new amba_device_alloc APIs. Acked-by: Rob Herring <[email protected]> Signed-off-by: Russell King <[email protected]>
This commit is contained in:
parent
d5dc9271b2
commit
c0f72f8a92
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue