diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2006-07-25 10:15:07 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-08-03 09:21:25 -0400 |
commit | be6a83dd668fb8578456b61d9e16a18d9bc37a65 (patch) | |
tree | b22c2d47bf7448f6fea3f264046bb21af7e86a6b | |
parent | 545b07d3620c9eac3349398b5303d20cab260ff6 (diff) |
[ALSA] aoa: platform function gpio: ignore errors from functions that don't exist
Sometimes we simply want to turn off or on everything, and when recently a
warning was added when a certain platform function can't be called, this
triggered all the time in those cases. This patch shows the warning only if
the error was different from the function not existing.
The alternative would be to not even try calling the function when it
doesn't exist by first checking which exist and then only calling those that
do, but that adds complexity that isn't necessary.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r-- | sound/aoa/core/snd-aoa-gpio-pmf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/aoa/core/snd-aoa-gpio-pmf.c b/sound/aoa/core/snd-aoa-gpio-pmf.c index 3d57fd1aec4b..2836c3218391 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); \ |