On Fri, 12 Nov 2010 15:57:56 +0200 Jarkko Nikula <jhnikula@xxxxxxxxx> wrote: > On Fri, 12 Nov 2010 13:18:41 +0000 > Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > struct snd_soc_dapm_context { > > > - struct list_head widgets; > > > + int n_widgets; /* number of widgets in this context */ > > > > I'm not sure why we need to count the number of widgets here; > > > True, this should go the next patch actually. > Not true, it is actually need here. We cannot detect widgetless codecs by testing list_empty(&card->widgets) after moving widgets from dapm to card so we must keep count of widgets for each DAPM context (device). - if (list_empty(&dapm->widgets)) { + if (!dapm->n_widgets) { -- Jarkko _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel