12 Nov
2010
12 Nov
'10
2:25 p.m.
On Fri, 12 Nov 2010 15:57:56 +0200 Jarkko Nikula jhnikula@gmail.com wrote:
On Fri, 12 Nov 2010 13:18:41 +0000 Mark Brown broonie@opensource.wolfsonmicro.com 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