Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp901349rdb; Fri, 20 Oct 2023 02:51:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFfRQ/RDZL0eK5Jw4t91dloUletcF7B/zDJzwswVJjashOmwu1lbzMW75Oly50ghyLpi+1v X-Received: by 2002:a05:6a20:42a8:b0:17b:f565:7e09 with SMTP id o40-20020a056a2042a800b0017bf5657e09mr1432506pzj.60.1697795495249; Fri, 20 Oct 2023 02:51:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697795495; cv=none; d=google.com; s=arc-20160816; b=vhJpzx7CIcRHGYOiFuoeJjez6RXAkDTbKLbAjJddHN7CMfF6W0sIgqboi/i+ppXhNF PwSoFP/YDM3gEI5r5JIicOCFJQaXdGJyNDJ3yfIEYOrvady1Ex7/Wom5JKpp3a7rAUIr TsWGl3qwvIJwJpwDZKXenSxw5ImqlJeSdxHyuptJ4+PfAUpVHXWyKxOPtH5hH3UOE9CJ aNbNFSj+eYRJ6nyBTf5efHU5Q5nmwz0B6bNKu13EdAay4b5aAWPfnMGkUss4I6EVEu3h YiaMexNvSyMMw/mERnDJQJElrJtdRYW0+5rOp7U5ybZYztIAzlySQQLjtF7P36oLOiiJ HzCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=8b8SZqSxpzSsRASHjK+Zv35pCFwQSCSmIFhf4GQxDjE=; fh=gCuEpdnQLg4vssKdE7Wt3Rbe5N+ut+NBWC9tWnKbW6Q=; b=FCLSnmN/zmAYeQSYgV2NAcYB64mnl3wkSXO7lGTw+iAad2YygI7pPLeWzaNHBM4QaF oD45QGmejVWJsOR6Cw0kZojSchkKN3TtPKhkUzT1X2m+V1aWpkYhK+geLj2u7eTiYF5a YNn313N7wOjij+eW4N9oUNAcofO+kya7pvKGst7mtBVE24Av4B/KTzR8e+QmyXPrROr8 OvLgON27jmqiNCJSwfVG5btf4H8By4oQywsFzF5htU5nk4bNzTD0LpS8D321PtQMQ1Bo 1KDO7EICHK3vRxlMagIlsYhi1yy6RHTx7H5PA0gF7bfroe3h/yKp48gGe43uzrVKa0r1 eVMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id nl11-20020a17090b384b00b002749baa2edesi4579497pjb.24.2023.10.20.02.51.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 73DC383C23AB; Fri, 20 Oct 2023 02:51:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376743AbjJTJvW (ORCPT + 99 others); Fri, 20 Oct 2023 05:51:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376736AbjJTJvP (ORCPT ); Fri, 20 Oct 2023 05:51:15 -0400 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 305691A6 for ; Fri, 20 Oct 2023 02:51:09 -0700 (PDT) X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) Received: from 192.168.10.46 by mg.richtek.com with MailGates ESMTPS Server V6.0(1461660:0:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Fri, 20 Oct 2023 17:50:37 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex3.rt.l (192.168.10.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Fri, 20 Oct 2023 17:50:36 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex4.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Fri, 20 Oct 2023 17:50:36 +0800 From: To: Mark Brown CC: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , ChiYuan Huang , Allen Lin , , Subject: [PATCH 1/3] ASoC: codecs: rtq9128: Fix string compare in DAPM event callback Date: Fri, 20 Oct 2023 17:50:33 +0800 Message-ID: <1697795435-5858-2-git-send-email-cy_huang@richtek.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1697795435-5858-1-git-send-email-cy_huang@richtek.com> References: <1697795435-5858-1-git-send-email-cy_huang@richtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 02:51:30 -0700 (PDT) From: ChiYuan Huang Since widget name may concatenate the component prefix. To compare the the name with 'strcmp' function in shared DAPM event callback will cause the wrong RG field control. Use 'strstr' function, instead. Signed-off-by: ChiYuan Huang --- sound/soc/codecs/rtq9128.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c index 371d622c6214..8c1c3c65475e 100644 --- a/sound/soc/codecs/rtq9128.c +++ b/sound/soc/codecs/rtq9128.c @@ -291,11 +291,11 @@ static int rtq9128_dac_power_event(struct snd_soc_dapm_widget *w, struct snd_kco dev_dbg(comp->dev, "%s: %s event %d\n", __func__, w->name, event); - if (strcmp(w->name, "DAC1") == 0) + if (strstr(w->name, "DAC1")) shift = 6; - else if (strcmp(w->name, "DAC2") == 0) + else if (strstr(w->name, "DAC2")) shift = 4; - else if (strcmp(w->name, "DAC3") == 0) + else if (strstr(w->name, "DAC3")) shift = 2; else shift = 0; -- 2.34.1