Commit 7a4fe652 authored by T.J. Mercier's avatar T.J. Mercier Committed by Sumit Semwal
Browse files

dma-buf: heaps: Add __init to CMA and system heap module_init functions



Shrink the kernel .text a bit after successful initialization of the
heaps.

Signed-off-by: default avatarT.J. Mercier <tjmercier@google.com>
Acked-by: default avatarJohn Stultz <jstultz@google.com>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240906000314.2368749-1-tjmercier@google.com
parent a6bb1f77
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ static const struct dma_heap_ops cma_heap_ops = {
	.allocate = cma_heap_allocate,
};

static int __add_cma_heap(struct cma *cma, void *data)
static int __init __add_cma_heap(struct cma *cma, void *data)
{
	struct cma_heap *cma_heap;
	struct dma_heap_export_info exp_info;
@@ -391,7 +391,7 @@ static int __add_cma_heap(struct cma *cma, void *data)
	return 0;
}

static int add_default_cma_heap(void)
static int __init add_default_cma_heap(void)
{
	struct cma *default_cma = dev_get_cma_area(NULL);
	int ret = 0;
+1 −1
Original line number Diff line number Diff line
@@ -421,7 +421,7 @@ static const struct dma_heap_ops system_heap_ops = {
	.allocate = system_heap_allocate,
};

static int system_heap_create(void)
static int __init system_heap_create(void)
{
	struct dma_heap_export_info exp_info;