Split soc-compress into a separate module so we only compile/load it when it's needed.
Signed-off-by: Jie Yang yang.jie@intel.com --- sound/soc/Makefile | 4 +++- sound/soc/soc-compress.c | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/sound/soc/Makefile b/sound/soc/Makefile index 184c1e6..2936088 100644 --- a/sound/soc/Makefile +++ b/sound/soc/Makefile @@ -1,7 +1,9 @@ snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o snd-soc-core-objs += soc-pcm.o soc-io.o soc-devres.o soc-ops.o snd-soc-core-objs += soc-topology.o -snd-soc-core-$(CONFIG_SND_SOC_COMPRESS) += soc-compress.o +snd-soc-compress-objs := soc-compress.o + +obj-$(CONFIG_SND_SOC_COMPRESS) += snd-soc-compress.o
ifneq ($(CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM),) snd-soc-core-objs += soc-generic-dmaengine-pcm.o diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 025c38f..a93ac8a 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -19,6 +19,7 @@ #include <linux/delay.h> #include <linux/slab.h> #include <linux/workqueue.h> +#include <linux/module.h> #include <sound/core.h> #include <sound/compress_params.h> #include <sound/compress_driver.h> @@ -703,3 +704,10 @@ compr_err: kfree(compr); return ret; } +EXPORT_SYMBOL_GPL(soc_new_compress); + +/* Module information */ +MODULE_AUTHOR("Ramesh Babu K V ramesh.babu@linux.intel.com"); +MODULE_AUTHOR("Vinod Koul vinod.koul@linux.intel.com"); +MODULE_DESCRIPTION("ALSA SoC Compress"); +MODULE_LICENSE("GPL v2");