Skip to contentSkip to conversation

ASoC: mx27vis-aic32x4: Make sure we are running on the correct machine

PATCH In review Fabio Estevam 2 participants 3 messages Mar 11, 2012

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 ASoC: mx27vis-aic32x4: Make sure we are running on the correct machine

Only register mx27vis-aic32x4 if we are running on a imx27_visstrim_m10.

---
 sound/soc/imx/mx27vis-aic32x4.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
sound/soc/imx/mx27vis-aic32x4.c +3 -0
index 976f857..c982bc8 100644
@@ -194,6 +194,9 @@ static int __init mx27vis_aic32x4_init(void)
 {
 	int ret;
 
+	if (!machine_is_imx27_visstrim_m10())
+		return 0;
+
 	mx27vis_aic32x4_snd_device = platform_device_alloc("soc-audio", -1);
 	if (!mx27vis_aic32x4_snd_device)
 		return -ENOMEM;
Signature · 1 line
1.7.1
author reviewer
#1 lore raw
Quoted 6 lines · Fabio Estevam

+       if (!machine_is_imx27_visstrim_m10())
+               return 0;
+
       mx27vis_aic32x4_snd_device = platform_device_alloc("soc-audio", -1); if (!mx27vis_aic32x4_snd_device)
               return -ENOMEM;

Or maybe should I use snd_soc_register_card instead and get rid of the machine_is_xxx check?
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#2 lore raw
Quoted 2 lines · Fabio Estevam

Or maybe should I use snd_soc_register_card instead and get rid of the machine_is_xxx check?

Yes, please.