Skip to contentSkip to conversation

ASoC: Check for machine type in GTA01 machine driver

PATCH Applied Mark Brown 2 participants 2 messages Oct 8, 2008

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: Check for machine type in GTA01 machine driver

Since there are now multiple OpenMoko platforms it is more important to check that the machine driver is running on the correct system. This was orgininally generated as part of the initial GTA02 machine port.

---
 sound/soc/s3c24xx/neo1973_wm8753.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
sound/soc/s3c24xx/neo1973_wm8753.c +7 -0
index c602674..87ddfef 100644
@@ -24,6 +24,7 @@
 #include <sound/soc-dapm.h>
 #include <sound/tlv.h>
 
+#include <asm/mach-types.h>
 #include <asm/hardware/scoop.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
@@ -677,6 +678,12 @@ static int __init neo1973_init(void)
 
 	DBG("Entered %s\n", __func__);
 
+	if (!machine_is_neo1973_gta01()) {
+		printk(KERN_INFO
+			"Only GTA01 hardware supported by ASoC driver\n");
+		return -ENODEV;
+	}
+
 	neo1973_snd_device = platform_device_alloc("soc-audio", -1);
 	if (!neo1973_snd_device)
 		return -ENOMEM;
Signature · 1 line
1.5.6.5
Applied
#1 lore raw

At Wed, 8 Oct 2008 13:02:20 +0100,

Quoted 6 lines · Mark Brown

Since there are now multiple OpenMoko platforms it is more important to check that the machine driver is running on the correct system. This was orgininally generated as part of the initial GTA02 machine port.

Applied. Thanks.

Takashi