From patchwork Mon Jun 16 16:13:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 4360691 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 791169F26E for ; Mon, 16 Jun 2014 16:20:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B8EF20274 for ; Mon, 16 Jun 2014 16:20:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3A62D20200 for ; Mon, 16 Jun 2014 16:20:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 47EA5265623; Mon, 16 Jun 2014 18:20:27 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D65B42654E8; Mon, 16 Jun 2014 18:13:48 +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 E3FCC26549B; Mon, 16 Jun 2014 18:13:42 +0200 (CEST) Received: from smtp-out-035.synserver.de (smtp-out-035.synserver.de [212.40.185.35]) by alsa0.perex.cz (Postfix) with ESMTP id 2AE5426549F for ; Mon, 16 Jun 2014 18:13:29 +0200 (CEST) Received: (qmail 18393 invoked by uid 0); 16 Jun 2014 16:13:28 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 17625 Received: from p4fe602a8.dip0.t-ipconnect.de (HELO lars-adi-laptop.analog.com) [79.230.2.168] by 217.119.54.96 with SMTP; 16 Jun 2014 16:13:28 -0000 From: Lars-Peter Clausen To: Mark Brown , Liam Girdwood Date: Mon, 16 Jun 2014 18:13:10 +0200 Message-Id: <1402935191-18398-11-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1402935191-18398-1-git-send-email-lars@metafoo.de> References: <1402935191-18398-1-git-send-email-lars@metafoo.de> Cc: Vinod Koul , alsa-devel@alsa-project.org, Lars-Peter Clausen Subject: [alsa-devel] [PATCH v2 10/11] ASoC: dapm: Remove DAI DAPM context 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 The DAI DAPM context was added in commit be09ad90 ("ASoC: core: Add platform DAI widget mapping") and the only user was removed again in commit ae10e7e8f ("ASoC: core: Only add platform DAI widgets once."). Now that we have a per component DAPM context it is unlikely that we'll need the DAI DAPM context again. Signed-off-by: Lars-Peter Clausen --- include/sound/soc-dai.h | 1 - sound/soc/soc-core.c | 12 +----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 688f2ba..031be2a 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -257,7 +257,6 @@ struct snd_soc_dai { struct snd_soc_dapm_widget *playback_widget; struct snd_soc_dapm_widget *capture_widget; - struct snd_soc_dapm_context dapm; /* DAI DMA data */ void *playback_dma_data; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index a414689..19dfa80 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1048,11 +1048,8 @@ static void soc_remove_link_dais(struct snd_soc_card *card, int num, int order) cpu_dai->name, err); } cpu_dai->probed = 0; - - if (!cpu_dai->codec) { - snd_soc_dapm_free(&cpu_dai->dapm); + if (!cpu_dai->codec) module_put(cpu_dai->dev->driver->owner); - } } } @@ -1510,11 +1507,8 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order) if (!cpu_dai->probed && cpu_dai->driver->probe_order == order) { if (!cpu_dai->codec) { - cpu_dai->dapm.card = card; if (!try_module_get(cpu_dai->dev->driver->owner)) return -ENODEV; - - list_add(&cpu_dai->dapm.list, &card->dapm_list); } if (cpu_dai->driver->probe) { @@ -3975,13 +3969,9 @@ static int snd_soc_register_dais(struct snd_soc_component *component, dai->component = component; dai->dev = dev; dai->driver = &dai_drv[i]; - dai->dapm.dev = dev; if (!dai->driver->ops) dai->driver->ops = &null_dai_ops; - if (!dai->codec) - dai->dapm.idle_bias_off = 1; - list_add(&dai->list, &component->dai_list); dev_dbg(dev, "ASoC: Registered DAI '%s'\n", dai->name);