]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: loongson: make loongson-i2s.o a separate module
authorArnd Bergmann <arnd@arndb.de>
Tue, 15 Oct 2024 15:09:54 +0000 (15:09 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 17 Oct 2024 11:13:10 +0000 (12:13 +0100)
An object file should not be linked into multiple modules and/or
vmlinux:

scripts/Makefile.build:221: /home/arnd/arm-soc/sound/soc/loongson/Makefile: loongson_i2s.o is added to multiple modules: snd-soc-loongson-i2s-pci snd-soc-loongson-i2s-plat

Change this one to make it a library module with two exported symbols
that will work in any configuration.

Fixes: ba4c5fad598c ("ASoC: loongson: Add I2S controller driver as platform device")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20241015150958.2294155-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/loongson/Makefile
sound/soc/loongson/loongson_i2s.c

index f396259244a32fdb67fa9d3316e351ec62400b24..c0cb1acb36e34789450441c4c8e7d075658ce2b2 100644 (file)
@@ -1,10 +1,12 @@
 # SPDX-License-Identifier: GPL-2.0
 #Platform Support
-snd-soc-loongson-i2s-pci-y := loongson_i2s_pci.o loongson_i2s.o loongson_dma.o
-obj-$(CONFIG_SND_SOC_LOONGSON_I2S_PCI) += snd-soc-loongson-i2s-pci.o
+snd-soc-loongson-i2s-pci-y := loongson_i2s_pci.o loongson_dma.o
+obj-$(CONFIG_SND_SOC_LOONGSON_I2S_PCI) += snd-soc-loongson-i2s-pci.o snd-soc-loongson-i2s.o
 
-snd-soc-loongson-i2s-plat-y := loongson_i2s_plat.o loongson_i2s.o
-obj-$(CONFIG_SND_SOC_LOONGSON_I2S_PLATFORM) += snd-soc-loongson-i2s-plat.o
+snd-soc-loongson-i2s-plat-y := loongson_i2s_plat.o
+obj-$(CONFIG_SND_SOC_LOONGSON_I2S_PLATFORM) += snd-soc-loongson-i2s-plat.o snd-soc-loongson-i2s.o
+
+snd-soc-loongson-i2s-y := loongson_i2s.o
 
 #Machine Support
 snd-soc-loongson-card-y := loongson_card.o
index 40bbf3205391860f16449352d0f2a97ff02694d8..e8852a30f213f0ab125d47fc95ecdf81f2531cc7 100644 (file)
@@ -246,6 +246,7 @@ struct snd_soc_dai_driver loongson_i2s_dai = {
        .ops = &loongson_i2s_dai_ops,
        .symmetric_rate = 1,
 };
+EXPORT_SYMBOL_GPL(loongson_i2s_dai);
 
 static int i2s_suspend(struct device *dev)
 {
@@ -268,3 +269,7 @@ static int i2s_resume(struct device *dev)
 const struct dev_pm_ops loongson_i2s_pm = {
        SYSTEM_SLEEP_PM_OPS(i2s_suspend, i2s_resume)
 };
+EXPORT_SYMBOL_GPL(loongson_i2s_pm);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Common functions for loongson I2S controller driver");