diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-07-01 16:13:45 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-02 16:24:04 -0400 |
commit | b8257be5fff447681af8c8b72f1380e8a9c04286 (patch) | |
tree | 59cbe1a6861006a3cad6eb519655d4304196f00d /sound/soc/soc-core.c | |
parent | 211bcc6c3af90f3ee1f1297349d9d692e5f1c7e0 (diff) |
ASoC: core: Remove duplicated rtd->codec initialization
rtd->codec is already initialized in soc_bind_dai_link(), so there is no need to
do it again in soc_dai_link_init(). Removing the rtd->codec initialization from
soc_dai_link_init() also removes the need for soc_dai_link_init() to know about
the CODEC at all.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 72d4a2b009fa..0cd36b781f4d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1308,9 +1308,7 @@ static int soc_aux_dev_init(struct snd_soc_card *card, | |||
1308 | return 0; | 1308 | return 0; |
1309 | } | 1309 | } |
1310 | 1310 | ||
1311 | static int soc_dai_link_init(struct snd_soc_card *card, | 1311 | static int soc_dai_link_init(struct snd_soc_card *card, int num) |
1312 | struct snd_soc_codec *codec, | ||
1313 | int num) | ||
1314 | { | 1312 | { |
1315 | struct snd_soc_dai_link *dai_link = &card->dai_link[num]; | 1313 | struct snd_soc_dai_link *dai_link = &card->dai_link[num]; |
1316 | struct snd_soc_pcm_runtime *rtd = &card->rtd[num]; | 1314 | struct snd_soc_pcm_runtime *rtd = &card->rtd[num]; |
@@ -1325,8 +1323,6 @@ static int soc_dai_link_init(struct snd_soc_card *card, | |||
1325 | return ret; | 1323 | return ret; |
1326 | } | 1324 | } |
1327 | 1325 | ||
1328 | rtd->codec = codec; | ||
1329 | |||
1330 | return 0; | 1326 | return 0; |
1331 | } | 1327 | } |
1332 | 1328 | ||
@@ -1344,7 +1340,7 @@ static int soc_post_component_init(struct snd_soc_card *card, | |||
1344 | dai_link = &card->dai_link[num]; | 1340 | dai_link = &card->dai_link[num]; |
1345 | rtd = &card->rtd[num]; | 1341 | rtd = &card->rtd[num]; |
1346 | name = dai_link->name; | 1342 | name = dai_link->name; |
1347 | ret = soc_dai_link_init(card, codec, num); | 1343 | ret = soc_dai_link_init(card, num); |
1348 | } else { | 1344 | } else { |
1349 | aux_dev = &card->aux_dev[num]; | 1345 | aux_dev = &card->aux_dev[num]; |
1350 | rtd = &card->rtd_aux[num]; | 1346 | rtd = &card->rtd_aux[num]; |