From: Mark Brown Date: Wed, 8 Oct 2008 12:02:20 +0000 (+0100) Subject: ALSA: ASoC: Check for machine type in GTA01 machine driver X-Git-Tag: v2.6.28-rc1~20^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb2aa074d4eac4957f5717d261bc336f4a5f31c4;p=platform%2Fupstream%2Fkernel-adaptation-pc.git ALSA: 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. Signed-off-by: Mark Brown Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index 47ddcde..73a50e9 100644 --- a/sound/soc/s3c24xx/neo1973_wm8753.c +++ b/sound/soc/s3c24xx/neo1973_wm8753.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -716,6 +717,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;