Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5707922iog; Thu, 23 Jun 2022 03:53:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tucniu+w6tPiG2KI9vFlx2WCFYcS5EPBoFwYsG8VecfYkZWvcTbcFgjO1B5LuU47UDzZqh X-Received: by 2002:aa7:dcc1:0:b0:435:5db1:c749 with SMTP id w1-20020aa7dcc1000000b004355db1c749mr10079714edu.124.1655981625019; Thu, 23 Jun 2022 03:53:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655981625; cv=none; d=google.com; s=arc-20160816; b=Bc5/MxjcxuJHTi8hUsczP4yGCiXptnpVZAJZ/Ryh1iarbcBKwOyWLyrSJPHZ1xfA8Q us91J3+upty6cq4epE/Dnw2OS1eruo0EAIIKOHmiPzb6ULhIDwSGpD6u87UHVMbC2yYh 2e4GWz+kLDElBgwDNXB5AlvdJQITZpe16Q+hofE2NfSTHfUGOdzlWeJoX9Cqyu7l6KOP YPzokwezpw8ZYWlxv5ncZj0SRDP/q2D6HV36HlK/974KSXs5SiQ8rdnLHfP5wECC8l9L wjOGZTIjONSLnd9kNFx4hBivR0/Ja+2JXEg+esUfToODwAoC+4Jr0hoGkx9p1awbBiGl nIxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=spwI6sAhpzo+8xV2qTuPti6l56+juOG2iCl+GRXgx6Y=; b=DeznLBsboP7DX6J3GkFft4d9CZSGs6xZsJGAMFWQRIOLPBdk2H9raCrTkroMdbl98B 8vxfi30mG/oipoW8b88w/txlv9o7iNInyUChKA5aV6gTrNljkQ/RjzhXrAD4fluDEkiV Z4+xr3N7T2hvCYZ147iZxXkb938Vx4wibNfPSkFCazdMvIxruFUZStKCOzhzA+r3oXmp HMroeD88YcHCFYvn+76TXqQ72DjAQ6fxBBNAZ3hz72EmJcmYskSIqgtB3ethNZXm8JPQ fSxxjQba7Gy9FMyOGI85Fgk+I/W1CbQj1JUnk0VIWeKh0sNdn7p1Wsbmlok9TLLPNonc RRGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=YWTCg5gw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mm6-20020a170906cc4600b006ff453083c1si6674172ejb.189.2022.06.23.03.53.11; Thu, 23 Jun 2022 03:53:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=YWTCg5gw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231398AbiFWKvw (ORCPT + 99 others); Thu, 23 Jun 2022 06:51:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231352AbiFWKvk (ORCPT ); Thu, 23 Jun 2022 06:51:40 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 301EE4B428 for ; Thu, 23 Jun 2022 03:51:39 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25NAKUqF006859; Thu, 23 Jun 2022 05:51:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=spwI6sAhpzo+8xV2qTuPti6l56+juOG2iCl+GRXgx6Y=; b=YWTCg5gwM6HNsL65S8x+ByDROJzBjEfDXslKcVsKpC68nrFMzeAHWHMwaXfQKtH+awqK Uv3IRazjoT8cu0EcFOdMh6h9IEvtK+o9pLpggDOHIbAYdzyZvnBusfPcrBH6Vc5MXrTC Bc1ANrSAIMvpbcvRpSXGq9zNHg4ITTNlW5wl3tS38LU/Pj1BC6dFfF7OECLEykd/lpnA /uME74/99UrDGT2/NGn/2FM4e4htX154qZMbSIq56mb3UAuylf0/SmROFdvd0bnpkWoJ DogLwUE5fb9/Ia4CxHm+tPtHQnWSk3uSuGq56O3rakggs30Z7WfpejcQu4JudaG/MOL5 jw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3gsc41f17q-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 23 Jun 2022 05:51:23 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 23 Jun 2022 11:51:20 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Thu, 23 Jun 2022 11:51:20 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 60B1A475; Thu, 23 Jun 2022 10:51:20 +0000 (UTC) From: Charles Keepax To: CC: , , , , , Subject: [PATCH 6/6] ASoC: dapm: Move stereo autodisable check Date: Thu, 23 Jun 2022 11:51:20 +0100 Message-ID: <20220623105120.1981154-6-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220623105120.1981154-1-ckeepax@opensource.cirrus.com> References: <20220623105120.1981154-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: JgCLQNmst0Kq0Pq3_XSo28iJj41Qufod X-Proofpoint-ORIG-GUID: JgCLQNmst0Kq0Pq3_XSo28iJj41Qufod X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tidy up the code a little, rather than repeating the check of mc->autodisable move the stereo error check to be under the existing if for mc->autodisable. Signed-off-by: Charles Keepax --- sound/soc/soc-dapm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index a8e842e02cdc2..b05231414c1d0 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -370,14 +370,14 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget, case snd_soc_dapm_mixer_named_ctl: mc = (struct soc_mixer_control *)kcontrol->private_value; - if (mc->autodisable && snd_soc_volsw_is_stereo(mc)) - dev_warn(widget->dapm->dev, - "ASoC: Unsupported stereo autodisable control '%s'\n", - ctrl_name); - if (mc->autodisable) { struct snd_soc_dapm_widget template; + if (snd_soc_volsw_is_stereo(mc)) + dev_warn(widget->dapm->dev, + "ASoC: Unsupported stereo autodisable control '%s'\n", + ctrl_name); + name = kasprintf(GFP_KERNEL, "%s %s", ctrl_name, "Autodisable"); if (!name) { -- 2.30.2