ASoC: Use more idiomatic driver name for WM8731
[safe/jmp/linux-2.6] / drivers / mfd / ucb1400_core.c
index 2afc080..85fd942 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/sched.h>
 #include <linux/ucb1400.h>
 
 unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel,
@@ -50,6 +51,7 @@ static int ucb1400_core_probe(struct device *dev)
        struct ucb1400_ts ucb_ts;
        struct ucb1400_gpio ucb_gpio;
        struct snd_ac97 *ac97;
+       struct ucb1400_pdata *pdata = dev->platform_data;
 
        memset(&ucb_ts, 0, sizeof(ucb_ts));
        memset(&ucb_gpio, 0, sizeof(ucb_gpio));
@@ -87,6 +89,12 @@ static int ucb1400_core_probe(struct device *dev)
 
        /* TOUCHSCREEN */
        ucb_ts.ac97 = ac97;
+
+       if (pdata != NULL && pdata->irq >= 0)
+               ucb_ts.irq = pdata->irq;
+       else
+               ucb_ts.irq = -1;
+
        ucb->ucb1400_ts = platform_device_alloc("ucb1400_ts", -1);
        if (!ucb->ucb1400_ts) {
                err = -ENOMEM;