From: Arnd Bergmann <arnd@kernel.org>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Binbin Zhou <zhoubinbin@loongson.cn>
Cc: Arnd Bergmann <arnd@arndb.de>,
tangbin <tangbin@cmss.chinamobile.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: loongson: make loongson-i2s.o a separate module
Date: Tue, 15 Oct 2024 15:09:54 +0000 [thread overview]
Message-ID: <20241015150958.2294155-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
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>
---
sound/soc/loongson/Makefile | 10 ++++++----
sound/soc/loongson/loongson_i2s.c | 5 +++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/sound/soc/loongson/Makefile b/sound/soc/loongson/Makefile
index f396259244a3..c0cb1acb36e3 100644
--- a/sound/soc/loongson/Makefile
+++ b/sound/soc/loongson/Makefile
@@ -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
diff --git a/sound/soc/loongson/loongson_i2s.c b/sound/soc/loongson/loongson_i2s.c
index 40bbf3205391..e8852a30f213 100644
--- a/sound/soc/loongson/loongson_i2s.c
+++ b/sound/soc/loongson/loongson_i2s.c
@@ -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");
--
2.39.5
next reply other threads:[~2024-10-15 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 15:09 Arnd Bergmann [this message]
2024-10-16 6:56 ` [PATCH] ASoC: loongson: make loongson-i2s.o a separate module 周彬彬
2024-10-16 7:02 ` Arnd Bergmann
2024-10-16 8:02 ` Binbin Zhou
2024-10-18 17:43 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241015150958.2294155-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tangbin@cmss.chinamobile.com \
--cc=tiwai@suse.com \
--cc=zhoubinbin@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox