* [PATCH] wm1133-ev1: fix init for multimachine kernel
@ 2010-10-21 21:35 Eric Bénard
2010-10-21 21:58 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Eric Bénard @ 2010-10-21 21:35 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Eric Bénard, Liam Girdwood
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] wm1133-ev1: fix init for multimachine kernel
2010-10-21 21:35 [PATCH] wm1133-ev1: fix init for multimachine kernel Eric Bénard
@ 2010-10-21 21:58 ` Mark Brown
2010-10-21 22:19 ` Eric Bénard
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2010-10-21 21:58 UTC (permalink / raw)
To: Eric Bénard; +Cc: alsa-devel, Liam Girdwood
On Thu, Oct 21, 2010 at 11:35:15PM +0200, Eric Bénard wrote:
> + if (!machine_is_mx31ads())
> + /* return happy. We might run on a totally different machine */
> + return 0;
> +
This is not a sufficient check, we may be running on an mx31ads with a
different PMIC module.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wm1133-ev1: fix init for multimachine kernel
2010-10-21 21:58 ` Mark Brown
@ 2010-10-21 22:19 ` Eric Bénard
2010-10-22 1:17 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Eric Bénard @ 2010-10-21 22:19 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Liam Girdwood
Hi Mark,
Le 21/10/2010 23:58, Mark Brown a écrit :
> On Thu, Oct 21, 2010 at 11:35:15PM +0200, Eric Bénard wrote:
>
>> + if (!machine_is_mx31ads())
>> + /* return happy. We might run on a totally different machine */
>> + return 0;
>> +
>
> This is not a sufficient check, we may be running on an mx31ads with a
> different PMIC module.
in which case the current code would also fail ;-)
I don't have such a board but actual code triggers the error log when running
the kernel on my board so I'm open to your suggestion for a better fix.
Thanks,
Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wm1133-ev1: fix init for multimachine kernel
2010-10-21 22:19 ` Eric Bénard
@ 2010-10-22 1:17 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2010-10-22 1:17 UTC (permalink / raw)
To: Eric Bénard; +Cc: alsa-devel, Liam Girdwood
On Fri, Oct 22, 2010 at 12:19:31AM +0200, Eric Bénard wrote:
> Le 21/10/2010 23:58, Mark Brown a écrit :
> >On Thu, Oct 21, 2010 at 11:35:15PM +0200, Eric Bénard wrote:
> >This is not a sufficient check, we may be running on an mx31ads with a
> >different PMIC module.
> in which case the current code would also fail ;-)
> I don't have such a board but actual code triggers the error log
> when running the kernel on my board so I'm open to your suggestion
> for a better fix.
Without adding machine fit checks it's always going to fail; machine
type isn't quite enough. What we should be doing here is using the
multi-component work to allow us to replace soc-audio devices with
devices named for the machine driver (which is all round better anyway).
I'll try to look at this for .38.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-22 1:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21 21:35 [PATCH] wm1133-ev1: fix init for multimachine kernel Eric Bénard
2010-10-21 21:58 ` Mark Brown
2010-10-21 22:19 ` Eric Bénard
2010-10-22 1:17 ` 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).