* [PATCH] ASoC: fsl: Fix multiple symbol definitions
@ 2013-01-30 20:24 Thierry Reding
2013-01-31 1:42 ` Shawn Guo
0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2013-01-30 20:24 UTC (permalink / raw)
To: Mark Brown; +Cc: Shawn Guo, alsa-devel, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: fsl: Fix multiple symbol definitions
2013-01-30 20:24 [PATCH] ASoC: fsl: Fix multiple symbol definitions Thierry Reding
@ 2013-01-31 1:42 ` Shawn Guo
2013-01-31 7:06 ` Thierry Reding
0 siblings, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2013-01-31 1:42 UTC (permalink / raw)
To: Thierry Reding; +Cc: Mark Brown, alsa-devel, linux-kernel
On Wed, Jan 30, 2013 at 09:24:31PM +0100, Thierry Reding wrote:
> 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>
Thanks, Thierry. The Kconfig is already complex. To avoid having them
even more complex, I have chosen to revert my patch and have a little
surgery on the code [1] to make it match the Kconfig rational.
Shawn
[1] http://thread.gmane.org/gmane.linux.alsa.devel/105018
> ---
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: fsl: Fix multiple symbol definitions
2013-01-31 1:42 ` Shawn Guo
@ 2013-01-31 7:06 ` Thierry Reding
2013-01-31 7:09 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2013-01-31 7:06 UTC (permalink / raw)
To: Shawn Guo; +Cc: Mark Brown, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]
On Thu, Jan 31, 2013 at 09:42:17AM +0800, Shawn Guo wrote:
> On Wed, Jan 30, 2013 at 09:24:31PM +0100, Thierry Reding wrote:
> > 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>
>
> Thanks, Thierry. The Kconfig is already complex. To avoid having them
> even more complex, I have chosen to revert my patch and have a little
> surgery on the code [1] to make it match the Kconfig rational.
>
> Shawn
>
> [1] http://thread.gmane.org/gmane.linux.alsa.devel/105018
That does indeed look much better than fiddling with the Makefile. My
automated ARM builds of linux-next were failing for a few days because
of this, so I guess the fix (as well as the MMC one) just hadn't made it
into linux-next yet.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: fsl: Fix multiple symbol definitions
2013-01-31 7:06 ` Thierry Reding
@ 2013-01-31 7:09 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-01-31 7:09 UTC (permalink / raw)
To: Thierry Reding; +Cc: Shawn Guo, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 384 bytes --]
On Thu, Jan 31, 2013 at 08:06:58AM +0100, Thierry Reding wrote:
> That does indeed look much better than fiddling with the Makefile. My
> automated ARM builds of linux-next were failing for a few days because
> of this, so I guess the fix (as well as the MMC one) just hadn't made it
> into linux-next yet.
The last -next was on the 29th, once it's rebuilt the fix should be
there.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-31 7:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 20:24 [PATCH] ASoC: fsl: Fix multiple symbol definitions Thierry Reding
2013-01-31 1:42 ` Shawn Guo
2013-01-31 7:06 ` Thierry Reding
2013-01-31 7:09 ` Mark Brown
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).