diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-08-19 09:51:30 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-19 11:59:48 -0400 |
commit | c5599b87a8317738a541d8893cb327df5d04b007 (patch) | |
tree | ee4241c8274d656de11921ff596bfdb0bdaeef1e | |
parent | 75af7c081982d76cef0daf26e96b5d1e8cb9d631 (diff) |
ASoC: Replace list_empty(&card->codec_dev_list) with !card->instantiated
With componentization we no longer necessarily need a snd_soc_codec struct for a
card. Instead of checking if the card's CODEC list is empty just use
card->instantiated to check if the card has been instantiated yet.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/soc-core.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 2d7a9ecbb0e3..c36983a133fa 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -552,10 +552,8 @@ int snd_soc_suspend(struct device *dev) | |||
552 | struct snd_soc_codec *codec; | 552 | struct snd_soc_codec *codec; |
553 | int i, j; | 553 | int i, j; |
554 | 554 | ||
555 | /* If the initialization of this soc device failed, there is no codec | 555 | /* If the card is not initialized yet there is nothing to do */ |
556 | * associated with it. Just bail out in this case. | 556 | if (!card->instantiated) |
557 | */ | ||
558 | if (list_empty(&card->codec_dev_list)) | ||
559 | return 0; | 557 | return 0; |
560 | 558 | ||
561 | /* Due to the resume being scheduled into a workqueue we could | 559 | /* Due to the resume being scheduled into a workqueue we could |
@@ -808,10 +806,8 @@ int snd_soc_resume(struct device *dev) | |||
808 | struct snd_soc_card *card = dev_get_drvdata(dev); | 806 | struct snd_soc_card *card = dev_get_drvdata(dev); |
809 | int i, ac97_control = 0; | 807 | int i, ac97_control = 0; |
810 | 808 | ||
811 | /* If the initialization of this soc device failed, there is no codec | 809 | /* If the card is not initialized yet there is nothing to do */ |
812 | * associated with it. Just bail out in this case. | 810 | if (!card->instantiated) |
813 | */ | ||
814 | if (list_empty(&card->codec_dev_list)) | ||
815 | return 0; | 811 | return 0; |
816 | 812 | ||
817 | /* activate pins from sleep state */ | 813 | /* activate pins from sleep state */ |