Revert "ANDROID: staging: android: ion: enable modularizing the ion driver"

This reverts commit f64a8b79c0.

This is a preparation change for merging android-4.19.110 into
msm-4.19 branch.

Revert ION heap modularization as it is not required on this version of
the kernel.

Change-Id: Ib75e5ac96f533b5612fa43e26ee5402941e84b64
Signed-off-by: Ivaylo Georgiev <irgeorgiev@codeaurora.org>
This commit is contained in:
Ivaylo Georgiev 2020-04-22 02:35:00 -07:00
parent c234ba42cd
commit f8b19f1eeb
6 changed files with 11 additions and 55 deletions

View file

@ -1,5 +1,5 @@
menuconfig ION
tristate "Ion Memory Manager"
bool "Ion Memory Manager"
depends on HAVE_MEMBLOCK && HAS_DMA && MMU
select GENERIC_ALLOCATOR
select DMA_SHARED_BUFFER

View file

@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_ION) += ion-alloc.o
ion-alloc-objs += ion.o ion-ioctl.o ion_heap.o
ion-alloc-$(CONFIG_ION_SYSTEM_HEAP) += ion_system_heap.o ion_page_pool.o
ion-alloc-$(CONFIG_ION_CARVEOUT_HEAP) += ion_carveout_heap.o
ion-alloc-$(CONFIG_ION_CHUNK_HEAP) += ion_chunk_heap.o
ion-alloc-$(CONFIG_ION_CMA_HEAP) += ion_cma_heap.o
obj-$(CONFIG_ION) += ion.o ion-ioctl.o ion_heap.o
obj-$(CONFIG_ION_SYSTEM_HEAP) += ion_system_heap.o ion_page_pool.o
obj-$(CONFIG_ION_CARVEOUT_HEAP) += ion_carveout_heap.o
obj-$(CONFIG_ION_CHUNK_HEAP) += ion_chunk_heap.o
obj-$(CONFIG_ION_CMA_HEAP) += ion_cma_heap.o

View file

@ -21,7 +21,6 @@
#include <linux/miscdevice.h>
#include <linux/mm.h>
#include <linux/mm_types.h>
#include <linux/module.h>
#include <linux/rbtree.h>
#include <linux/sched/task.h>
#include <linux/seq_file.h>
@ -661,36 +660,4 @@ static int ion_device_create(void)
kfree(idev);
return ret;
}
#ifdef CONFIG_ION_MODULE
int ion_module_init(void)
{
int ret;
ret = ion_device_create();
#ifdef CONFIG_ION_SYSTEM_HEAP
if (ret)
return ret;
ret = ion_system_heap_create();
if (ret)
return ret;
ret = ion_system_contig_heap_create();
#endif
#ifdef CONFIG_ION_CMA_HEAP
if (ret)
return ret;
ret = ion_add_cma_heaps();
#endif
return ret;
}
module_init(ion_module_init);
#else
subsys_initcall(ion_device_create);
#endif
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Ion memory allocator");

View file

@ -336,9 +336,4 @@ long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
int ion_query_heaps(struct ion_heap_query *query);
#ifdef CONFIG_ION_MODULE
int ion_add_cma_heaps(void);
int ion_system_heap_create(void);
int ion_system_contig_heap_create(void);
#endif
#endif /* _ION_H */

View file

@ -134,12 +134,9 @@ static int __ion_add_cma_heaps(struct cma *cma, void *data)
return 0;
}
int ion_add_cma_heaps(void)
static int ion_add_cma_heaps(void)
{
cma_for_each_area(__ion_add_cma_heaps, NULL);
return 0;
}
#ifndef CONFIG_ION_MODULE
device_initcall(ion_add_cma_heaps);
#endif

View file

@ -289,7 +289,7 @@ static struct ion_heap *__ion_system_heap_create(void)
return ERR_PTR(-ENOMEM);
}
int ion_system_heap_create(void)
static int ion_system_heap_create(void)
{
struct ion_heap *heap;
@ -301,6 +301,7 @@ int ion_system_heap_create(void)
ion_device_add_heap(heap);
return 0;
}
device_initcall(ion_system_heap_create);
static int ion_system_contig_heap_allocate(struct ion_heap *heap,
struct ion_buffer *buffer,
@ -382,7 +383,7 @@ static struct ion_heap *__ion_system_contig_heap_create(void)
return heap;
}
int ion_system_contig_heap_create(void)
static int ion_system_contig_heap_create(void)
{
struct ion_heap *heap;
@ -393,8 +394,5 @@ int ion_system_contig_heap_create(void)
ion_device_add_heap(heap);
return 0;
}
#ifndef CONFIG_ION_MODULE
device_initcall(ion_system_contig_heap_create);
device_initcall(ion_system_heap_create);
#endif