提交 04b8290f 编写于 作者: L Laura Abbott 提交者: Greg Kroah-Hartman

staging: android: ion: Get rid of ion_reserve

ion_reserve was supposed to be used to reserve memory in board files.
These days, board files are no more and there are other more controlled
mechanisms for reserving memory. Get rid of this function.
Signed-off-by: NLaura Abbott <labbott@redhat.com>
Reviewed-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0ba5aa47
...@@ -1650,37 +1650,3 @@ void ion_device_destroy(struct ion_device *dev) ...@@ -1650,37 +1650,3 @@ void ion_device_destroy(struct ion_device *dev)
} }
EXPORT_SYMBOL(ion_device_destroy); EXPORT_SYMBOL(ion_device_destroy);
void __init ion_reserve(struct ion_platform_data *data)
{
int i;
for (i = 0; i < data->nr; i++) {
if (data->heaps[i].size == 0)
continue;
if (data->heaps[i].base == 0) {
phys_addr_t paddr;
paddr = memblock_alloc_base(data->heaps[i].size,
data->heaps[i].align,
MEMBLOCK_ALLOC_ANYWHERE);
if (!paddr) {
pr_err("%s: error allocating memblock for heap %d\n",
__func__, i);
continue;
}
data->heaps[i].base = paddr;
} else {
int ret = memblock_reserve(data->heaps[i].base,
data->heaps[i].size);
if (ret)
pr_err("memblock reserve of %zx@%lx failed\n",
data->heaps[i].size,
data->heaps[i].base);
}
pr_info("%s: %s reserved base %lx size %zu\n", __func__,
data->heaps[i].name,
data->heaps[i].base,
data->heaps[i].size);
}
}
...@@ -72,17 +72,6 @@ struct ion_platform_data { ...@@ -72,17 +72,6 @@ struct ion_platform_data {
struct ion_platform_heap *heaps; struct ion_platform_heap *heaps;
}; };
/**
* ion_reserve() - reserve memory for ion heaps if applicable
* @data: platform data specifying starting physical address and
* size
*
* Calls memblock reserve to set aside memory for heaps that are
* located at specific memory addresses or of specific sizes not
* managed by the kernel
*/
void ion_reserve(struct ion_platform_data *data);
/** /**
* ion_client_create() - allocate a client and returns it * ion_client_create() - allocate a client and returns it
* @dev: the global ion device * @dev: the global ion device
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册