diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2006-07-25 16:15:07 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-08-03 15:21:25 +0200 |
commit | be6a83dd668fb8578456b61d9e16a18d9bc37a65 (patch) | |
tree | b22c2d47bf7448f6fea3f264046bb21af7e86a6b /sound/aoa | |
parent | 545b07d3620c9eac3349398b5303d20cab260ff6 (diff) | |
download | kernel_samsung_smdk4412-be6a83dd668fb8578456b61d9e16a18d9bc37a65.zip kernel_samsung_smdk4412-be6a83dd668fb8578456b61d9e16a18d9bc37a65.tar.gz kernel_samsung_smdk4412-be6a83dd668fb8578456b61d9e16a18d9bc37a65.tar.bz2 |
[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>
Diffstat (limited to 'sound/aoa')
-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 3d57fd1..2836c32 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)\ \ if (unlikely(!rt)) return; \ rc = pmf_call_function(rt->node, #name "-mute", &args); \ - if (rc) \ + if (rc && rc != -ENODEV) \ printk(KERN_WARNING "pmf_gpio_set_" #name \ " failed, rc: %d\n", rc); \ rt->implementation_private &= ~(1<<bit); \ |