From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH] ASoC: Remove unused dapm_get_snd_card() and dapm_get_soc_card()
Date: Tue, 23 Jul 2013 11:12:25 +0200 [thread overview]
Message-ID: <1374570745-32224-1-git-send-email-lars@metafoo.de> (raw)
These two functions were added two years ago in commit 4805608 ("ASoC: dapm -
Add methods to retrieve snd_card and soc_card from dapm context.") but have
remained unused so far. Considering that the dapm context actually has a direct
pointer to the card the functions also seem to be unnecessary. E.g. the
expressions 'dapm_get_soc_card(dapm)' and 'dapm->card' yield the same result.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/soc-dapm.c | 30 ------------------------------
1 file changed, 30 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 346ac91..deb1b3d 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -174,36 +174,6 @@ static inline struct snd_soc_dapm_widget *dapm_cnew_widget(
return kmemdup(_widget, sizeof(*_widget), GFP_KERNEL);
}
-/* get snd_card from DAPM context */
-static inline struct snd_card *dapm_get_snd_card(
- struct snd_soc_dapm_context *dapm)
-{
- if (dapm->codec)
- return dapm->codec->card->snd_card;
- else if (dapm->platform)
- return dapm->platform->card->snd_card;
- else
- BUG();
-
- /* unreachable */
- return NULL;
-}
-
-/* get soc_card from DAPM context */
-static inline struct snd_soc_card *dapm_get_soc_card(
- struct snd_soc_dapm_context *dapm)
-{
- if (dapm->codec)
- return dapm->codec->card;
- else if (dapm->platform)
- return dapm->platform->card;
- else
- BUG();
-
- /* unreachable */
- return NULL;
-}
-
static void dapm_reset(struct snd_soc_card *card)
{
struct snd_soc_dapm_widget *w;
--
1.8.0
next reply other threads:[~2013-07-23 9:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 9:12 Lars-Peter Clausen [this message]
2013-07-23 12:49 ` [PATCH] ASoC: Remove unused dapm_get_snd_card() and dapm_get_soc_card() Liam Girdwood
2013-07-23 17:36 ` Mark Brown
2013-07-23 17:57 ` Lars-Peter Clausen
2013-07-23 19:32 ` Mark Brown
2013-07-23 19:47 ` Lars-Peter Clausen
2013-07-24 0:10 ` Mark Brown
2013-07-23 19:14 ` Peter Ujfalusi
2013-07-23 12:56 ` Mark Brown
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=1374570745-32224-1-git-send-email-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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