Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: loongson: make loongson-i2s.o a separate module

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>

authored by

Arnd Bergmann and committed by
Mark Brown
43916d92 7bc18a78

+11 -4
+6 -4
sound/soc/loongson/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 #Platform Support 3 - snd-soc-loongson-i2s-pci-y := loongson_i2s_pci.o loongson_i2s.o loongson_dma.o 4 - obj-$(CONFIG_SND_SOC_LOONGSON_I2S_PCI) += snd-soc-loongson-i2s-pci.o 3 + snd-soc-loongson-i2s-pci-y := loongson_i2s_pci.o loongson_dma.o 4 + obj-$(CONFIG_SND_SOC_LOONGSON_I2S_PCI) += snd-soc-loongson-i2s-pci.o snd-soc-loongson-i2s.o 5 5 6 - snd-soc-loongson-i2s-plat-y := loongson_i2s_plat.o loongson_i2s.o 7 - obj-$(CONFIG_SND_SOC_LOONGSON_I2S_PLATFORM) += snd-soc-loongson-i2s-plat.o 6 + snd-soc-loongson-i2s-plat-y := loongson_i2s_plat.o 7 + obj-$(CONFIG_SND_SOC_LOONGSON_I2S_PLATFORM) += snd-soc-loongson-i2s-plat.o snd-soc-loongson-i2s.o 8 + 9 + snd-soc-loongson-i2s-y := loongson_i2s.o 8 10 9 11 #Machine Support 10 12 snd-soc-loongson-card-y := loongson_card.o
+5
sound/soc/loongson/loongson_i2s.c
··· 246 246 .ops = &loongson_i2s_dai_ops, 247 247 .symmetric_rate = 1, 248 248 }; 249 + EXPORT_SYMBOL_GPL(loongson_i2s_dai); 249 250 250 251 static int i2s_suspend(struct device *dev) 251 252 { ··· 269 268 const struct dev_pm_ops loongson_i2s_pm = { 270 269 SYSTEM_SLEEP_PM_OPS(i2s_suspend, i2s_resume) 271 270 }; 271 + EXPORT_SYMBOL_GPL(loongson_i2s_pm); 272 + 273 + MODULE_LICENSE("GPL"); 274 + MODULE_DESCRIPTION("Common functions for loongson I2S controller driver");