ASoC: fix davinci-sffsdr buglet
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 5 Jan 2009 10:08:30 +0000 (02:08 -0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 5 Jan 2009 13:09:31 +0000 (13:09 +0000)
Minor bugfix:  now that DaVinci kernels can support multiple
boards, board-specific ASoC components need to verify they're
running on the right board before initializing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/davinci/davinci-sffsdr.c

index f67579d..4935d1b 100644 (file)
@@ -24,6 +24,7 @@
 #include <sound/soc-dapm.h>
 
 #include <asm/dma.h>
+#include <asm/mach-types.h>
 #include <asm/plat-sffsdr/sffsdr-fpga.h>
 
 #include <mach/mcbsp.h>
@@ -115,6 +116,9 @@ static int __init sffsdr_init(void)
 {
        int ret;
 
+       if (!machine_is_sffsdr())
+               return -EINVAL;
+
        sffsdr_snd_device = platform_device_alloc("soc-audio", 0);
        if (!sffsdr_snd_device) {
                printk(KERN_ERR "platform device allocation failed\n");