From: Johannes Berg <johannes@sipsolutions•net>
To: linuxppc-dev@ozlabs•org
Cc: alsa-devel@alsa-project•org
Subject: [PATCH 4/5] aoa: platform function gpio: ignore errors from functions that dont exist
Date: Tue, 18 Jul 2006 19:28:45 +0200 [thread overview]
Message-ID: <20060718173018.070118000@sipsolutions.net> (raw)
In-Reply-To: 20060718172841.046446000@sipsolutions.net
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>
--- linux-2.6-fetch.orig/sound/aoa/core/snd-aoa-gpio-pmf.c 2006-07-18 19:24:30.273476868 +0200
+++ linux-2.6-fetch/sound/aoa/core/snd-aoa-gpio-pmf.c 2006-07-18 19:24:55.103476868 +0200
@@ -18,7 +18,7 @@ static void pmf_gpio_set_##name(struct g
\
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); \
--
next prev parent reply other threads:[~2006-07-18 18:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-18 17:28 [PATCH 0/5] powerpc sound, some more patches Johannes Berg
2006-07-18 17:28 ` [PATCH 1/5] aoa: feature gpio layer: fix IRQ access Johannes Berg
2006-07-18 18:45 ` Benjamin Herrenschmidt
2006-07-18 17:28 ` [PATCH 2/5] aoa: fix toonie codec Johannes Berg
2006-07-18 17:28 ` [PATCH 3/5] make snd-powermac load even when it cant bind the device Johannes Berg
2006-07-18 17:28 ` Johannes Berg [this message]
2006-07-18 17:28 ` [PATCH 5/5] add MAINTAINERS entry for snd-aoa Johannes Berg
2006-07-25 14:17 ` [Alsa-devel] [PATCH 0/5] powerpc sound, some more patches Takashi Iwai
2006-07-25 15:13 ` Johannes Berg
2006-07-25 15:21 ` Takashi Iwai
2006-08-05 16:09 ` Johannes Berg
2006-07-25 21:52 ` Benjamin Herrenschmidt
2006-07-26 17:19 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060718173018.070118000@sipsolutions.net \
--to=johannes@sipsolutions$(echo .)net \
--cc=alsa-devel@alsa-project$(echo .)org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox