ASoC: rx1950: check that machine is rx1950 in glue driver
authorVasily Khoruzhick <anarsoul@gmail.com>
Tue, 7 Sep 2010 14:04:15 +0000 (17:04 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 8 Sep 2010 10:26:57 +0000 (11:26 +0100)
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/s3c24xx/rx1950_uda1380.c

index 2a16113231fd38d84b26095273dfc33a07bc93ac..0f6e806834bc13659acb42ab29b6071931bcdd3c 100644 (file)
@@ -40,6 +40,8 @@
 
 #include <mach/regs-clock.h>
 
+#include <asm/mach-types.h>
+
 #include "s3c-dma.h"
 #include "s3c24xx-i2s.h"
 #include "../codecs/uda1380.h"
@@ -274,6 +276,9 @@ static int __init rx1950_init(void)
 {
        int ret;
 
+       if (!machine_is_rx1950())
+               return -ENODEV;
+
        /* configure some gpios */
        ret = gpio_request(S3C2410_GPA(1), "speaker-power");
        if (ret)