diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-07-10 07:44:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:19 -0400 |
commit | e53fcabc6d923e9c1cdd073ea2e2212daf907622 (patch) | |
tree | 01b20c2ac97b293f83bb84ba6f8f27023b8523f7 | |
parent | 977c60238cfff1f9eb07cfd78bc02da91b7b499b (diff) |
[PATCH] aoa: pmf gpio: report if function calling fails
This patch makes the pmf GPIO layer in aoa report if calling a platform
function failed.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | sound/aoa/core/snd-aoa-gpio-pmf.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sound/aoa/core/snd-aoa-gpio-pmf.c b/sound/aoa/core/snd-aoa-gpio-pmf.c index 0e9b9bb2a6de..3d57fd1aec4b 100644 --- a/sound/aoa/core/snd-aoa-gpio-pmf.c +++ b/sound/aoa/core/snd-aoa-gpio-pmf.c | |||
@@ -14,9 +14,13 @@ | |||
14 | static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\ | 14 | static void pmf_gpio_set_##name(struct gpio_runtime *rt, int on)\ |
15 | { \ | 15 | { \ |
16 | struct pmf_args args = { .count = 1, .u[0].v = !on }; \ | 16 | struct pmf_args args = { .count = 1, .u[0].v = !on }; \ |
17 | \ | 17 | int rc; \ |
18 | \ | ||
18 | if (unlikely(!rt)) return; \ | 19 | if (unlikely(!rt)) return; \ |
19 | pmf_call_function(rt->node, #name "-mute", &args); \ | 20 | rc = pmf_call_function(rt->node, #name "-mute", &args); \ |
21 | if (rc) \ | ||
22 | printk(KERN_WARNING "pmf_gpio_set_" #name \ | ||
23 | " failed, rc: %d\n", rc); \ | ||
20 | rt->implementation_private &= ~(1<<bit); \ | 24 | rt->implementation_private &= ~(1<<bit); \ |
21 | rt->implementation_private |= (!!on << bit); \ | 25 | rt->implementation_private |= (!!on << bit); \ |
22 | } \ | 26 | } \ |
@@ -33,9 +37,13 @@ PMF_GPIO(lineout, 2); | |||
33 | static void pmf_gpio_set_hw_reset(struct gpio_runtime *rt, int on) | 37 | static void pmf_gpio_set_hw_reset(struct gpio_runtime *rt, int on) |
34 | { | 38 | { |
35 | struct pmf_args args = { .count = 1, .u[0].v = !!on }; | 39 | struct pmf_args args = { .count = 1, .u[0].v = !!on }; |
40 | int rc; | ||
36 | 41 | ||
37 | if (unlikely(!rt)) return; | 42 | if (unlikely(!rt)) return; |
38 | pmf_call_function(rt->node, "hw-reset", &args); | 43 | rc = pmf_call_function(rt->node, "hw-reset", &args); |
44 | if (rc) | ||
45 | printk(KERN_WARNING "pmf_gpio_set_hw_reset" | ||
46 | " failed, rc: %d\n", rc); | ||
39 | } | 47 | } |
40 | 48 | ||
41 | static void pmf_gpio_all_amps_off(struct gpio_runtime *rt) | 49 | static void pmf_gpio_all_amps_off(struct gpio_runtime *rt) |