linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][sound/SOC] Do not register platform sound device unconditionally
@ 2011-11-28 14:11 Juergen Beisert
  0 siblings, 0 replies; only message in thread
From: Juergen Beisert @ 2011-11-28 14:11 UTC (permalink / raw)
  To: alsa-devel; +Cc: linux-kernel

Registering a SOC device and also changing register unconditionally fails on
kernels which support more than one machine in one binary. Do it only if the
platform matches.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

diff --git a/sound/soc/imx/mx27vis-aic32x4.c b/sound/soc/imx/mx27vis-aic32x4.c
index 054110b..c5cfb8a 100644
--- a/sound/soc/imx/mx27vis-aic32x4.c
+++ b/sound/soc/imx/mx27vis-aic32x4.c
@@ -96,6 +96,10 @@ static int __init mx27vis_aic32x4_init(void)
 {
 	int ret;
 
+	if (!machine_is_imx27_visstrim_m10())
+		/* return happy. We run on a totally different machine */
+		return 0;
+
 	mx27vis_aic32x4_snd_device = platform_device_alloc("soc-audio", -1);
 	if (!mx27vis_aic32x4_snd_device)
 		return -ENOMEM;

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-28 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-28 14:11 [PATCH][sound/SOC] Do not register platform sound device unconditionally Juergen Beisert

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).