Skip to content

Commit

Permalink
[ALSA] aoa: platform function gpio: ignore errors from functions that…
Browse files Browse the repository at this point in the history
… 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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
jmberg authored and Jaroslav Kysela committed Aug 3, 2006
1 parent 545b07d commit be6a83d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/aoa/core/snd-aoa-gpio-pmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down

0 comments on commit be6a83d

Please sign in to comment.