]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: Remove card field from snd_soc_dai struct
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 4 Nov 2014 10:30:58 +0000 (11:30 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 4 Nov 2014 11:53:53 +0000 (11:53 +0000)
The card field of the snd_soc_dai field is very rarely used. We can use
dai->component->card instead and remove the card field from the snd_soc_dai
struct.

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

index 45d0fa10ab9ed3286b3970419e19ac306a548d41..373d1775ecba1d913a8d8e553f69cd372e4a626e 100644 (file)
@@ -275,8 +275,6 @@ struct snd_soc_dai {
        unsigned int tx_mask;
        unsigned int rx_mask;
 
-       struct snd_soc_card *card;
-
        struct list_head list;
 };
 
index ea1df2083bd5581da1f37dd56a1b6245a672fe4b..f3216fc6d9f12da323b162f396c2b4ddc5b59700 100644 (file)
@@ -1315,11 +1315,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
        dev_dbg(card->dev, "ASoC: probe %s dai link %d late %d\n",
                        card->name, num, order);
 
-       /* config components */
-       cpu_dai->card = card;
-       for (i = 0; i < rtd->num_codecs; i++)
-               rtd->codec_dais[i]->card = card;
-
        /* set default power off timeout */
        rtd->pmdown_time = pmdown_time;
 
@@ -2314,7 +2309,7 @@ EXPORT_SYMBOL_GPL(snd_soc_add_card_controls);
 int snd_soc_add_dai_controls(struct snd_soc_dai *dai,
        const struct snd_kcontrol_new *controls, int num_controls)
 {
-       struct snd_card *card = dai->card->snd_card;
+       struct snd_card *card = dai->component->card->snd_card;
 
        return snd_soc_add_controls(card, dai->dev, controls, num_controls,
                        NULL, dai);
index 6bf2c9795df2a9c394afa640fca8a96e3b77d859..c5136bb1f9821afe43bae8a2f9bece210e699952 100644 (file)
@@ -1043,7 +1043,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget,
 int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream,
        struct snd_soc_dapm_widget_list **list)
 {
-       struct snd_soc_card *card = dai->card;
+       struct snd_soc_card *card = dai->component->card;
        struct snd_soc_dapm_widget *w;
        int paths;