]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/aoa/core/snd-aoa-gpio-feature.c
Merge gregkh@master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / sound / aoa / core / snd-aoa-gpio-feature.c
index 7ae0c0bdfad8fec28e49f4bb3cde0c18e5c3ee9d..f69d33357a28777eab460943bcec783bd52d70c6 100644 (file)
@@ -112,7 +112,10 @@ static struct device_node *get_gpio(char *name,
 
 static void get_irq(struct device_node * np, int *irqptr)
 {
-       *irqptr = irq_of_parse_and_map(np, 0);
+       if (np)
+               *irqptr = irq_of_parse_and_map(np, 0);
+       else
+               *irqptr = NO_IRQ;
 }
 
 /* 0x4 is outenable, 0x1 is out, thus 4 or 5 */
@@ -322,7 +325,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);