summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/bytcr_rt5640.c
diff options
context:
space:
mode:
authorKuninori Morimoto2018-09-18 03:29:55 +0200
committerMark Brown2018-09-20 19:22:58 +0200
commitf70f18f7d459b7958a4d3944396e2bc4a9f7ed72 (patch)
tree582fe6db59657040b02a73ae05822468c190b906 /sound/soc/intel/boards/bytcr_rt5640.c
parentASoC: add for_each_card_rtds() macro (diff)
downloadkernel-qcow2-linux-f70f18f7d459b7958a4d3944396e2bc4a9f7ed72.tar.gz
kernel-qcow2-linux-f70f18f7d459b7958a4d3944396e2bc4a9f7ed72.tar.xz
kernel-qcow2-linux-f70f18f7d459b7958a4d3944396e2bc4a9f7ed72.zip
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>
Diffstat (limited to 'sound/soc/intel/boards/bytcr_rt5640.c')
-rw-r--r--sound/soc/intel/boards/bytcr_rt5640.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index b6dc524830b2..8587bd3d1cc1 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -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);