diff options
Diffstat (limited to 'sound/aoa/core')
-rw-r--r-- | sound/aoa/core/snd-aoa-gpio-feature.c | 7 | ||||
-rw-r--r-- | sound/aoa/core/snd-aoa-gpio-pmf.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sound/aoa/core/snd-aoa-gpio-feature.c b/sound/aoa/core/snd-aoa-gpio-feature.c index 7ae0c0bdfad..f69d33357a2 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 | ||
113 | static void get_irq(struct device_node * np, int *irqptr) | 113 | static 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(¬if->mutex); | 331 | mutex_lock(¬if->mutex); |
diff --git a/sound/aoa/core/snd-aoa-gpio-pmf.c b/sound/aoa/core/snd-aoa-gpio-pmf.c index 3d57fd1aec4..2836c321839 100644 --- a/sound/aoa/core/snd-aoa-gpio-pmf.c +++ b/sound/aoa/core/snd-aoa-gpio-pmf.c | |||
@@ -18,7 +18,7 @@ static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\ | |||
18 | \ | 18 | \ |
19 | if (unlikely(!rt)) return; \ | 19 | if (unlikely(!rt)) return; \ |
20 | rc = pmf_call_function(rt->node, #name "-mute", &args); \ | 20 | rc = pmf_call_function(rt->node, #name "-mute", &args); \ |
21 | if (rc) \ | 21 | if (rc && rc != -ENODEV) \ |
22 | printk(KERN_WARNING "pmf_gpio_set_" #name \ | 22 | printk(KERN_WARNING "pmf_gpio_set_" #name \ |
23 | " failed, rc: %d\n", rc); \ | 23 | " failed, rc: %d\n", rc); \ |
24 | rt->implementation_private &= ~(1<<bit); \ | 24 | rt->implementation_private &= ~(1<<bit); \ |