]> err.no Git - linux-2.6/blobdiff - sound/aoa/core/snd-aoa-gpio-feature.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[linux-2.6] / sound / aoa / core / snd-aoa-gpio-feature.c
index bab97547a052ee66278df503aefbcfb2f109251f..40eb47eccf9a9acfe0304284054607ecaa7e79f2 100644 (file)
@@ -56,7 +56,7 @@ static struct device_node *get_gpio(char *name,
 {
        struct device_node *np, *gpio;
        u32 *reg;
-       char *audio_gpio;
+       const char *audio_gpio;
 
        *gpioptr = -1;
 
@@ -112,12 +112,10 @@ static struct device_node *get_gpio(char *name,
 
 static void get_irq(struct device_node * np, int *irqptr)
 {
-       *irqptr = -1;
-       if (!np)
-               return;
-       if (np->n_intrs != 1)
-               return;
-       *irqptr = np->intrs[0].line;
+       if (np)
+               *irqptr = irq_of_parse_and_map(np, 0);
+       else
+               *irqptr = NO_IRQ;
 }
 
 /* 0x4 is outenable, 0x1 is out, thus 4 or 5 */
@@ -285,9 +283,7 @@ static void ftr_gpio_exit(struct gpio_runtime *rt)
        mutex_destroy(&rt->line_out_notify.mutex);
 }
 
-static irqreturn_t ftr_handle_notify_irq(int xx,
-                                        void *data,
-                                        struct pt_regs *regs)
+static irqreturn_t ftr_handle_notify_irq(int xx, void *data)
 {
        struct gpio_notification *notif = data;
 
@@ -327,7 +323,7 @@ static int ftr_set_notify(struct gpio_runtime *rt,
                return -EINVAL;
        }
 
-       if (irq == -1)
+       if (irq == NO_IRQ)
                return -ENODEV;
 
        mutex_lock(&notif->mutex);