diff options
| author | Maxime Ripard <mripard@kernel.org> | 2026-04-27 12:04:59 +0200 |
|---|---|---|
| committer | Sumit Semwal <sumit.semwal@linaro.org> | 2026-05-21 20:57:16 +0530 |
| commit | fd55edff8a0abe1b198af9a4280bfb208b9d2ab7 (patch) | |
| tree | 3412318ae8999dc99aa8bbc15e7f8b52cfaf6247 /drivers/dma-buf/heaps | |
| parent | 10bb37fc624cfcc1d10e0ebfc1b829401abba91e (diff) | |
dma-buf: heaps: system: Turn the heap into a module
The system heap can be easily turned into a module by adding the usual
MODULE_* macros, importing the proper namespaces and changing the
Kconfig symbol to a tristate.
This heap won't be able to unload though, since we're missing a lot of
infrastructure to make it safe.
Reviewed-by: T.J. Mercier <tjmercier@google.com>
Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patch.msgid.link/20260427-dma-buf-heaps-as-modules-v5-3-b6f5678feefc@kernel.org
Diffstat (limited to 'drivers/dma-buf/heaps')
| -rw-r--r-- | drivers/dma-buf/heaps/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/dma-buf/heaps/system_heap.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dma-buf/heaps/Kconfig b/drivers/dma-buf/heaps/Kconfig index aed0b9b4febf..e273fb18feca 100644 --- a/drivers/dma-buf/heaps/Kconfig +++ b/drivers/dma-buf/heaps/Kconfig @@ -1,5 +1,5 @@ config DMABUF_HEAPS_SYSTEM - bool "DMA-BUF System Heap" + tristate "DMA-BUF System Heap" depends on DMABUF_HEAPS help Choose this option to enable the system dmabuf heap. The system heap diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma-buf/heaps/system_heap.c index 03c2b87cb111..c92bdec356fc 100644 --- a/drivers/dma-buf/heaps/system_heap.c +++ b/drivers/dma-buf/heaps/system_heap.c @@ -537,3 +537,8 @@ static int __init system_heap_create(void) return 0; } module_init(system_heap_create); + +MODULE_DESCRIPTION("DMA-BUF System Heap"); +MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS("DMA_BUF"); +MODULE_IMPORT_NS("DMA_BUF_HEAP"); |
