ASoC: add for_each_card_components() macro
To be more readable code, this patch adds new for_each_card_components() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
bcb1fd1fcd
commit
f70f18f7d4
@@ -1048,7 +1048,7 @@ static int byt_rt5640_suspend(struct snd_soc_card *card)
|
||||
if (!BYT_RT5640_JDSRC(byt_rt5640_quirk))
|
||||
return 0;
|
||||
|
||||
list_for_each_entry(component, &card->component_dev_list, card_list) {
|
||||
for_each_card_components(card, component) {
|
||||
if (!strcmp(component->name, byt_rt5640_codec_name)) {
|
||||
dev_dbg(component->dev, "disabling jack detect before suspend\n");
|
||||
snd_soc_component_set_jack(component, NULL, NULL);
|
||||
@@ -1067,7 +1067,7 @@ static int byt_rt5640_resume(struct snd_soc_card *card)
|
||||
if (!BYT_RT5640_JDSRC(byt_rt5640_quirk))
|
||||
return 0;
|
||||
|
||||
list_for_each_entry(component, &card->component_dev_list, card_list) {
|
||||
for_each_card_components(card, component) {
|
||||
if (!strcmp(component->name, byt_rt5640_codec_name)) {
|
||||
dev_dbg(component->dev, "re-enabling jack detect after resume\n");
|
||||
snd_soc_component_set_jack(component, &priv->jack, NULL);
|
||||
|
Reference in New Issue
Block a user