alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@avionic-design.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Shawn Guo <shawn.guo@linaro.org>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: fsl: Fix multiple symbol definitions
Date: Wed, 30 Jan 2013 21:24:31 +0100	[thread overview]
Message-ID: <1359577471-15029-1-git-send-email-thierry.reding@avionic-design.de> (raw)

Commit 25b8d31 (ASoC: fsl: fix multiple definition of init_module) fixed
a build error due to multiple symbol definitions when building as a
module. However, it causes the build to break when the driver is builtin
because the imx-pcm.o object is included multiple times. Solve the issue
by adding imx-pcm.o to each of the modules that require it, but only add
it to the kernel once when one or both drivers are builtin.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
 sound/soc/fsl/Makefile | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index ec14579..8446d49 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -30,21 +30,24 @@ obj-$(CONFIG_SND_MPC52xx_SOC_EFIKA) += efika-audio-fabric.o
 # i.MX Platform Support
 snd-soc-imx-ssi-objs := imx-ssi.o
 snd-soc-imx-audmux-objs := imx-audmux.o
-snd-soc-imx-pcm-objs := imx-pcm.o
-ifneq ($(CONFIG_SND_SOC_IMX_PCM_FIQ),)
-	snd-soc-imx-pcm-objs += imx-pcm-fiq.o
-endif
-ifneq ($(CONFIG_SND_SOC_IMX_PCM_DMA),)
-	snd-soc-imx-pcm-objs += imx-pcm-dma.o
-endif
 
 obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o
 obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o
 
 obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += snd-soc-imx-pcm-fiq.o
-snd-soc-imx-pcm-fiq-y := imx-pcm-fiq.o imx-pcm.o
+snd-soc-imx-pcm-fiq-y := imx-pcm-fiq.o
+ifeq ($(CONFIG_SND_SOC_IMX_PCM_FIQ),m)
+snd-soc-imx-pcm-fiq-y += imx-pcm.o
+else
+obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += imx-pcm.o
+endif
 obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += snd-soc-imx-pcm-dma.o
-snd-soc-imx-pcm-dma-y := imx-pcm-dma.o imx-pcm.o
+snd-soc-imx-pcm-dma-y := imx-pcm-dma.o
+ifeq ($(CONFIG_SND_SOC_IMX_PCM_DMA),m)
+snd-soc-imx-pcm-dma-y := imx-pcm.o
+else
+obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += imx-pcm.o
+endif
 
 # i.MX Machine Support
 snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
-- 
1.8.1.2

             reply	other threads:[~2013-01-30 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 20:24 Thierry Reding [this message]
2013-01-31  1:42 ` [PATCH] ASoC: fsl: Fix multiple symbol definitions Shawn Guo
2013-01-31  7:06   ` Thierry Reding
2013-01-31  7:09     ` 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=1359577471-15029-1-git-send-email-thierry.reding@avionic-design.de \
    --to=thierry.reding@avionic-design.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).