]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dma-buf: heaps: Add __init to CMA and system heap module_init functions
authorT.J. Mercier <tjmercier@google.com>
Fri, 6 Sep 2024 00:03:12 +0000 (00:03 +0000)
committerSumit Semwal <sumit.semwal@linaro.org>
Mon, 9 Sep 2024 10:21:54 +0000 (15:51 +0530)
Shrink the kernel .text a bit after successful initialization of the
heaps.

Signed-off-by: T.J. Mercier <tjmercier@google.com>
Acked-by: John Stultz <jstultz@google.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240906000314.2368749-1-tjmercier@google.com
drivers/dma-buf/heaps/cma_heap.c
drivers/dma-buf/heaps/system_heap.c

index c384004b918e23909a5b8bef519e6860b1dfc021..39c1e533a2f2c64ab66e46da4d48770dd4e7f34f 100644 (file)
@@ -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;
index d78cdb9d01e5e404f5024ea04cd6acbffa5bd0f6..26d5dc89ea1663a0d078e3a5723ca3d8d12b935f 100644 (file)
@@ -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;