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 | 20 ++++++++++++++++++++ 2 files changed, 23 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..9683f53 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,22 @@ compr_err: kfree(compr); return ret; } + +static int __init soc_compress_init(void) +{ + return 0; +} +module_init(soc_compress_init); + +static void __exit soc_compress_exit(void) +{ +} +module_exit(soc_compress_exit); + +/* Module information */ +MODULE_AUTHOR("Namarta Kohli namartax.kohli@intel.com"); +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"); +MODULE_ALIAS("platform:soc-compress");