X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fof%2Fplatform.c;h=343ad29e211c66768491e325046ff0b58bcb15ec;hb=89d4a1753b6632327f18d6c8e0842b366b736621;hp=20fbebd49db348f6c61ed13a038335b748629495;hpb=280ad7fda5f95211857fda38960f2b6fdf6edd3e;p=platform%2Fkernel%2Flinux-exynos.git diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 20fbebd..343ad29 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, 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 */