From: "Eric Bénard" <eric@eukrea.com>
To: alsa-devel@alsa-project.org
Cc: "Mark Brown" <broonie@opensource.wolfsonmicro.com>,
"Eric Bénard" <eric@eukrea.com>,
"Liam Girdwood" <lrg@slimlogic.co.uk>
Subject: [PATCH] wm1133-ev1: fix init for multimachine kernel
Date: Thu, 21 Oct 2010 23:35:15 +0200 [thread overview]
Message-ID: <1287696915-10392-1-git-send-email-eric@eukrea.com> (raw)
when running a kernel built using mx3_defconfig, I get an error message
because wm1133-ev1 tries to alloc soc-audio even if not running on an
iMX31ads :
sysfs: cannot create duplicate filename '/devices/platform/soc-audio'
.../...
kobject_add_internal failed for soc-audio with -EEXIST, don't try to register things with the same name in the same directory.
This patch fix this problem.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/imx/wm1133-ev1.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/sound/soc/imx/wm1133-ev1.c b/sound/soc/imx/wm1133-ev1.c
index a6e7d94..ef37440 100644
--- a/sound/soc/imx/wm1133-ev1.c
+++ b/sound/soc/imx/wm1133-ev1.c
@@ -20,6 +20,7 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
+#include <asm/mach-types.h>
#include <mach/audmux.h>
@@ -269,6 +270,10 @@ static int __init wm1133_ev1_audio_init(void)
int ret;
unsigned int ptcr, pdcr;
+ if (!machine_is_mx31ads())
+ /* return happy. We might run on a totally different machine */
+ return 0;
+
/* SSI0 mastered by port 5 */
ptcr = MXC_AUDMUX_V2_PTCR_SYN |
MXC_AUDMUX_V2_PTCR_TFSDIR |
--
1.7.0.4
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next reply other threads:[~2010-10-21 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 21:35 Eric Bénard [this message]
2010-10-21 21:58 ` [PATCH] wm1133-ev1: fix init for multimachine kernel Mark Brown
2010-10-21 22:19 ` Eric Bénard
2010-10-22 1:17 ` 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=1287696915-10392-1-git-send-email-eric@eukrea.com \
--to=eric@eukrea.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
/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).