From patchwork Sat Aug 26 08:30:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: anish kumar X-Patchwork-Id: 9923259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E334B6022E for ; Sat, 26 Aug 2017 08:30:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE6DB2856B for ; Sat, 26 Aug 2017 08:30:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C1D48285C5; Sat, 26 Aug 2017 08:30:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19A8D2856B for ; Sat, 26 Aug 2017 08:30:41 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AA24526743E; Sat, 26 Aug 2017 10:30:27 +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 B0693267428; Sat, 26 Aug 2017 10:30:24 +0200 (CEST) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by alsa0.perex.cz (Postfix) with ESMTP id 855CB2678E8 for ; Sat, 26 Aug 2017 10:30:08 +0200 (CEST) Received: by mail-pg0-f65.google.com with SMTP id t3so2402277pgt.5 for ; Sat, 26 Aug 2017 01:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=JAX7WqogOl64h0yENu56AT5RYa4BgjMdbJHp6UhBfmI=; b=FZGL53YfIXhvOseSeg85ZtZdsoz7HkCgAG+dLRHJwBi14+OT9WS3aXxXtS4EjQepst c7UF/qUyxMKyJ4sNMFZPhFlAvxomBZ5oohs1HnJUv8qtQlCZA//zUELku0iKEmDUlxoX E0cBluXY1aSG8Gw+eRIRvHZHwCy232UPkp2gbeZnmBDJYPHBp9E2I7gLRZkp817lHRNC FddfO+81aDwMoW+Ev+2WnEYs1/P9bf2eStg2lJUFMYp+qMcPFF70mFiZFu9ggcMewEvE u+2+evdEpnOQ8SpgVgQmBkXTYsG0UczntF4EJ1md0xJ5/mTpcuF+yowHVO3VZgsBXVa8 R2RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JAX7WqogOl64h0yENu56AT5RYa4BgjMdbJHp6UhBfmI=; b=UEsoZ98lO7G4a0ua7ROrJIkf74OlM1cmOOksTL0t2+6VXtzv36Z5yD2XRcD8G+1Esf Pv8AsVHcrpnWw2GTzs6wiDhM/exiWXwbdBIg+lRuIJirtnrG5R5gCIinJjwY2MnKBfGE pk0PqtEO6lA92/1Memlr98klNjatIvzbzbuvCj7qIUxRG4mxBl0rO5pkp7Ov6bzKZqDl NFgOohEAWeeKfLU27X1Lt6yaAMDRz4fmWjLBmFyDKWJTMyTMosd+zTkguF9X1u2NGdnO FLZIRh70lyqNLcPIIwGjdK3S0Bf3X/Rc6iwpd1cPnZCMctRqES+WfPOy8gLwfGBfuvnR MYLA== X-Gm-Message-State: AHYfb5ili+bjKTQY0oGZfK/BgdP48s9CqMtRZdEaycNFntjZbbaoZA+/ 6SUDnBo9vuLaHw== X-Received: by 10.99.113.77 with SMTP id b13mr1107389pgn.122.1503736207458; Sat, 26 Aug 2017 01:30:07 -0700 (PDT) Received: from AIKUMA-MBP.hsd1.ca.comcast.net. ([24.6.106.169]) by smtp.googlemail.com with ESMTPSA id m66sm15237966pfk.11.2017.08.26.01.30.05 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 26 Aug 2017 01:30:07 -0700 (PDT) From: anish kumar To: broonie@kernel.org Date: Sat, 26 Aug 2017 01:30:04 -0700 Message-Id: <20170826083004.35610-1-yesanishhere@gmail.com> X-Mailer: git-send-email 2.10.1 (Apple Git-78) Cc: anish kumar , alsa-devel@alsa-project.org, tiwai@suse.com, lgirdwood@gmail.com Subject: [alsa-devel] [patch 4/4] ASoC: dapm: Remove the redundant check 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 Remove this redundant check, the check for creating the control in the case of codec to codec dai link is moved to snd_soc_dapm_new_pcm function. Signed-off-by: anish kumar --- sound/soc/soc-dapm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 5d792dc..3ecaad0 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -1032,10 +1032,6 @@ static int dapm_new_dai_link(struct snd_soc_dapm_widget *w) struct snd_soc_dapm_context *dapm = w->dapm; struct snd_card *card = dapm->card->snd_card; - /* create control for links with > 1 config */ - if (w->num_params <= 1) - return 0; - /* add kcontrol */ for (i = 0; i < w->num_kcontrols; i++) { kcontrol = snd_soc_cnew(&w->kcontrol_news[i], w,