Commit c5599b87 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 75af7c08
...@@ -552,10 +552,8 @@ int snd_soc_suspend(struct device *dev) ...@@ -552,10 +552,8 @@ int snd_soc_suspend(struct device *dev)
struct snd_soc_codec *codec; struct snd_soc_codec *codec;
int i, j; int i, j;
/* If the initialization of this soc device failed, there is no codec /* If the card is not initialized yet there is nothing to do */
* associated with it. Just bail out in this case. if (!card->instantiated)
*/
if (list_empty(&card->codec_dev_list))
return 0; return 0;
/* Due to the resume being scheduled into a workqueue we could /* Due to the resume being scheduled into a workqueue we could
...@@ -808,10 +806,8 @@ int snd_soc_resume(struct device *dev) ...@@ -808,10 +806,8 @@ int snd_soc_resume(struct device *dev)
struct snd_soc_card *card = dev_get_drvdata(dev); struct snd_soc_card *card = dev_get_drvdata(dev);
int i, ac97_control = 0; int i, ac97_control = 0;
/* If the initialization of this soc device failed, there is no codec /* If the card is not initialized yet there is nothing to do */
* associated with it. Just bail out in this case. if (!card->instantiated)
*/
if (list_empty(&card->codec_dev_list))
return 0; return 0;
/* activate pins from sleep state */ /* activate pins from sleep state */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment