diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-04 05:30:58 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-04 06:53:53 -0500 |
commit | 313665b983fe30af9d0eb274f7e03276e05a1bbf (patch) | |
tree | 4593d35748f415e6b55ffb7e17ebc32c672f473a | |
parent | ff1b1c3fef511ff051db0d5de332afd15acad363 (diff) |
ASoC: Remove card field from snd_soc_dai struct
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>
-rw-r--r-- | include/sound/soc-dai.h | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 7 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 45d0fa10ab9e..373d1775ecba 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -275,8 +275,6 @@ struct snd_soc_dai { | |||
275 | unsigned int tx_mask; | 275 | unsigned int tx_mask; |
276 | unsigned int rx_mask; | 276 | unsigned int rx_mask; |
277 | 277 | ||
278 | struct snd_soc_card *card; | ||
279 | |||
280 | struct list_head list; | 278 | struct list_head list; |
281 | }; | 279 | }; |
282 | 280 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ea1df2083bd5..f3216fc6d9f1 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1315,11 +1315,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order) | |||
1315 | dev_dbg(card->dev, "ASoC: probe %s dai link %d late %d\n", | 1315 | dev_dbg(card->dev, "ASoC: probe %s dai link %d late %d\n", |
1316 | card->name, num, order); | 1316 | card->name, num, order); |
1317 | 1317 | ||
1318 | /* config components */ | ||
1319 | cpu_dai->card = card; | ||
1320 | for (i = 0; i < rtd->num_codecs; i++) | ||
1321 | rtd->codec_dais[i]->card = card; | ||
1322 | |||
1323 | /* set default power off timeout */ | 1318 | /* set default power off timeout */ |
1324 | rtd->pmdown_time = pmdown_time; | 1319 | rtd->pmdown_time = pmdown_time; |
1325 | 1320 | ||
@@ -2314,7 +2309,7 @@ EXPORT_SYMBOL_GPL(snd_soc_add_card_controls); | |||
2314 | int snd_soc_add_dai_controls(struct snd_soc_dai *dai, | 2309 | int snd_soc_add_dai_controls(struct snd_soc_dai *dai, |
2315 | const struct snd_kcontrol_new *controls, int num_controls) | 2310 | const struct snd_kcontrol_new *controls, int num_controls) |
2316 | { | 2311 | { |
2317 | struct snd_card *card = dai->card->snd_card; | 2312 | struct snd_card *card = dai->component->card->snd_card; |
2318 | 2313 | ||
2319 | return snd_soc_add_controls(card, dai->dev, controls, num_controls, | 2314 | return snd_soc_add_controls(card, dai->dev, controls, num_controls, |
2320 | NULL, dai); | 2315 | NULL, dai); |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 6bf2c9795df2..c5136bb1f982 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1043,7 +1043,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
1043 | int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, | 1043 | int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream, |
1044 | struct snd_soc_dapm_widget_list **list) | 1044 | struct snd_soc_dapm_widget_list **list) |
1045 | { | 1045 | { |
1046 | struct snd_soc_card *card = dai->card; | 1046 | struct snd_soc_card *card = dai->component->card; |
1047 | struct snd_soc_dapm_widget *w; | 1047 | struct snd_soc_dapm_widget *w; |
1048 | int paths; | 1048 | int paths; |
1049 | 1049 | ||