aboutsummaryrefslogtreecommitdiffstats
path: root/sound/aoa/core/snd-aoa-gpio-feature.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-08-07 09:16:35 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-08-07 09:16:35 -0400
commitad73c67e792c752ddc99f2b0587abae05255dd6d (patch)
treee33d5d37a8c56b6fad753fa2d481f43cfb60ae1d /sound/aoa/core/snd-aoa-gpio-feature.c
parent08eac93a689ca05c7b7413f6d362c7d38b5fd5b1 (diff)
parent9f737633e6ee54fc174282d49b2559bd2208391d (diff)
Merge branch 'master'
Diffstat (limited to 'sound/aoa/core/snd-aoa-gpio-feature.c')
-rw-r--r--sound/aoa/core/snd-aoa-gpio-feature.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/aoa/core/snd-aoa-gpio-feature.c b/sound/aoa/core/snd-aoa-gpio-feature.c
index 7ae0c0bdfad8..f69d33357a28 100644
--- a/sound/aoa/core/snd-aoa-gpio-feature.c
+++ b/sound/aoa/core/snd-aoa-gpio-feature.c
@@ -112,7 +112,10 @@ static struct device_node *get_gpio(char *name,
112 112
113static void get_irq(struct device_node * np, int *irqptr) 113static void get_irq(struct device_node * np, int *irqptr)
114{ 114{
115 *irqptr = irq_of_parse_and_map(np, 0); 115 if (np)
116 *irqptr = irq_of_parse_and_map(np, 0);
117 else
118 *irqptr = NO_IRQ;
116} 119}
117 120
118/* 0x4 is outenable, 0x1 is out, thus 4 or 5 */ 121/* 0x4 is outenable, 0x1 is out, thus 4 or 5 */
@@ -322,7 +325,7 @@ static int ftr_set_notify(struct gpio_runtime *rt,
322 return -EINVAL; 325 return -EINVAL;
323 } 326 }
324 327
325 if (irq == -1) 328 if (irq == NO_IRQ)
326 return -ENODEV; 329 return -ENODEV;
327 330
328 mutex_lock(&notif->mutex); 331 mutex_lock(&notif->mutex);