On 10/25/2016 03:21 AM, Kuninori Morimoto wrote: > > From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> > > In current ALSA SoC, Codec only has suspend/resume feature. > But it should be supported on Component level. This patch adds it. > This patch replaces current codec_dev_list to component_dev_list. > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> This looks good, but can you move the removal of the codec_dev_list to a separate patch. This will make it more clear what is going on. One patch to move suspend to component, one patch to cleanup and remove codec_dev_list. > --- > include/sound/soc.h | 9 ++-- > sound/soc/intel/boards/broadwell.c | 10 +++-- > sound/soc/intel/boards/cht_bsw_rt5672.c | 10 +++-- > sound/soc/soc-core.c | 73 +++++++++++++++++++-------------- > 4 files changed, 59 insertions(+), 43 deletions(-) [...] > static int broadwell_suspend(struct snd_soc_card *card){ > - struct snd_soc_codec *codec; > + struct snd_soc_component *component; > > - list_for_each_entry(codec, &card->codec_dev_list, card_list) { > + list_for_each_entry(component, &card->component_dev_list, card_list) { > + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); The case should happen after the name has been matched, otherwise we are casting components that are not CODECs. Same for the other similar places. > if (!strcmp(codec->component.name, "i2c-INT343A:00")) { > dev_dbg(codec->dev, "disabling jack detect before going to suspend.\n"); > rt286_mic_detect(codec, NULL); > @@ -233,9 +234,10 @@ static int broadwell_suspend(struct snd_soc_card *card){ > } _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel