Skip to contentSkip to conversation

Do not register platform sound device unconditionally

PATCH New Juergen Beisert 1 participant 1 message Nov 28, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not register platform sound device unconditionally

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.

sound/soc/imx/mx27vis-aic32x4.c +4 -0
index 054110b..c5cfb8a 100644
@@ -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;
Signature · 2 lines
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |