From patchwork Fri May 1 16:02:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 6312021 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 93A7BBEEE1 for ; Fri, 1 May 2015 17:17:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC1D620445 for ; Fri, 1 May 2015 17:17:03 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D1548203AA for ; Fri, 1 May 2015 17:17:02 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D6CA6265A12; Fri, 1 May 2015 19:17:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 394B02605F3; Fri, 1 May 2015 19:16:04 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A3D72261527; Fri, 1 May 2015 19:16:02 +0200 (CEST) Received: from smtp-out-014.synserver.de (smtp-out-017.synserver.de [212.40.185.17]) by alsa0.perex.cz (Postfix) with ESMTP id 0DAC92605F3 for ; Fri, 1 May 2015 19:15:53 +0200 (CEST) Received: (qmail 2440 invoked by uid 0); 1 May 2015 16:03:13 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 1686 Received: from ppp-188-174-97-41.dynamic.mnet-online.de (HELO lars-adi-laptop.fritz.box) [188.174.97.41] by 217.119.54.96 with SMTP; 1 May 2015 16:03:13 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Fri, 1 May 2015 18:02:42 +0200 Message-Id: <1430496165-13917-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 Cc: Charles Keepax , Lars-Peter Clausen , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 1/4] ASoC: dapm: Add new widgets to the end of the widget list X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Currently new widgets are appended to the beginning of the cards widget list. This has the effect that widgets that are created while iterating over the widget list in snd_soc_dapm_new_widgets() (like e.g. the auto-disable widgets) are not covered during that invocation of the function. If no further invocations of snd_soc_dapm_new_widgets() happen these widgets will not be fully initialized and e.g. no debugfs entries are created for them. By adding new widgets to the end of the widget list we make sure that widgets that are created in snd_soc_dapm_new_widgets() will still be handled during the same snd_soc_dapm_new_widgets() invocation and are always fully initialized. Signed-off-by: Lars-Peter Clausen --- This series depends on Charles' mux auto-disable series. --- sound/soc/soc-dapm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 79e6cf4..5c159f4 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3252,7 +3252,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, INIT_LIST_HEAD(&w->sinks); INIT_LIST_HEAD(&w->list); INIT_LIST_HEAD(&w->dirty); - list_add(&w->list, &dapm->card->widgets); + list_add_tail(&w->list, &dapm->card->widgets); w->inputs = -1; w->outputs = -1;