kernel: modularize dma shared buffer code to eliminate kernel bloat
[openwrt/openwrt.git] / target / linux / generic / patches-4.1 / 904-debloat_dma_buf.patch
1 --- a/drivers/base/Kconfig
2 +++ b/drivers/base/Kconfig
3 @@ -229,7 +229,7 @@ config SOC_BUS
4 source "drivers/base/regmap/Kconfig"
5
6 config DMA_SHARED_BUFFER
7 - bool
8 + tristate
9 default n
10 select ANON_INODES
11 help
12 --- a/drivers/dma-buf/Makefile
13 +++ b/drivers/dma-buf/Makefile
14 @@ -1 +1,2 @@
15 -obj-y := dma-buf.o fence.o reservation.o seqno-fence.o
16 +obj-$(CONFIG_DMA_SHARED_BUFFER) := dma-shared-buffer.o
17 +dma-shared-buffer-objs := dma-buf.o fence.o reservation.o seqno-fence.o
18 --- a/drivers/dma-buf/dma-buf.c
19 +++ b/drivers/dma-buf/dma-buf.c
20 @@ -901,4 +901,4 @@ static void __exit dma_buf_deinit(void)
21 {
22 dma_buf_uninit_debugfs();
23 }
24 -__exitcall(dma_buf_deinit);
25 +module_exit(dma_buf_deinit);
26 --- a/kernel/sched/core.c
27 +++ b/kernel/sched/core.c
28 @@ -1768,6 +1768,7 @@ int wake_up_state(struct task_struct *p,
29 {
30 return try_to_wake_up(p, state, 0);
31 }
32 +EXPORT_SYMBOL_GPL(wake_up_state);
33
34 /*
35 * This function clears the sched_dl_entity static params.