]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: Pass card instead of dapm context to snd_soc_dapm_new_widgets()
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 27 Aug 2013 13:51:01 +0000 (15:51 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 27 Aug 2013 14:41:16 +0000 (15:41 +0100)
snd_soc_dapm_new_widgets() works on the ASoC card as a whole not on a specific
DAPM context. The DAPM context that is passed as the parameter is only used to
look up the pointer to the card. This patch updates the signature of
snd_soc_dapm_new_widgets() to take the card directly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
include/sound/soc-dapm.h
sound/soc/soc-core.c
sound/soc/soc-dapm.c

index c728d28ae9a581143bbcabd2da3b179274034090..27a72d5d4b00ff36133fb19a2a1580044ac27d11 100644 (file)
@@ -413,7 +413,7 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
                         struct snd_soc_dapm_widget *sink);
 
 /* dapm path setup */
-int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm);
+int snd_soc_dapm_new_widgets(struct snd_soc_card *card);
 void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm);
 int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
                            const struct snd_soc_dapm_route *route, int num);
index d476f752e3f14b2422dd9bd69f4283d91edc336d..ed3c253066b1b6e6bedcb07310f379234754df2e 100644 (file)
@@ -1807,7 +1807,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
                list_for_each_entry(codec, &card->codec_dev_list, card_list)
                        snd_soc_dapm_auto_nc_codec_pins(codec);
 
-       snd_soc_dapm_new_widgets(&card->dapm);
+       snd_soc_dapm_new_widgets(card);
 
        ret = snd_card_register(card->snd_card);
        if (ret < 0) {
index 7e9afbc49ef2482d9418010e8e5bb854a92cfaba..548b1c9e875e34be3664e3fa578f44e7f0d69102 100644 (file)
@@ -2712,9 +2712,8 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_weak_routes);
  *
  * Returns 0 for success.
  */
-int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
+int snd_soc_dapm_new_widgets(struct snd_soc_card *card)
 {
-       struct snd_soc_card *card = dapm->card;
        struct snd_soc_dapm_widget *w;
        unsigned int val;