From patchwork Wed Mar 1 11:02:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?VHJldm9yIFd1ICjlkLPmlofoia8p?= X-Patchwork-Id: 62849 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3569604wrd; Wed, 1 Mar 2023 03:13:10 -0800 (PST) X-Google-Smtp-Source: AK7set9Xt342s5T9zp+SLVa4dRY1IqrHaCWVDtstMcXTbXpU2EJK7odp+iESOQm7uaFwLsYWuKPz X-Received: by 2002:aa7:9830:0:b0:5dc:e57:e0e7 with SMTP id q16-20020aa79830000000b005dc0e57e0e7mr5149716pfl.22.1677669190059; Wed, 01 Mar 2023 03:13:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677669190; cv=none; d=google.com; s=arc-20160816; b=nE/SVx8A0UcLDk5b3gR+GdQrZp4BFYPzzBqNSF7UcPzVgRrBWZlrcx6aEnVMPg/qJ9 PJYKIqjPHU8CjeYl47zp4XV1+sO3AJUghSNSfU167YnkfYSX8cemg1AbSrGHnMsJl79i UA9jPDVPKqPuU7gBTWWD8SFCYoS6Vu94smRXANL1J3+GFbiSO4zo0baO2kNQtX6MDxKw 0EHlZtOuIdIf+Hy7+pR2KO1JpM2OtU9jOkb8uy8K+Zcuk3lZGLQ+g/JUw1Dyd0/gvsUH UbGcgrlL5hMlJohbQ21i1RdpvHdK+0FiJvtPNBml8afD9sgsES2TTyy1wwcFVPwRE6C3 RBMg== 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:dkim-signature; bh=JujL0zJMof6BeSlvA5bvmTeu3hHrd2enXVP0mfRzsrA=; b=cn+cdNQxW7g2h0CImI++PysCozbPUr3PmL0S6On8gc+GBRfkNQCsMB4J7bUNkAyWiv 3/aLklqeA5lYMcKiYCndXmR+4CGihDvisEy5vdauP7uDeboZBVsed4f6vY2txOZn3wiu jG5XsmOVFCNWYCYC9NBYMSrGNd5HTvEdh48rDbUKn7jGaRDABW9yiJkPS5fh4IRKoI53 ODu8vkIywZUjjY1LoFmdUJvcqNWsBM3M4Pk2IFizfoXa5yJbUjNGIeqJZ0tUqh1YeJmO ny58soGF54EkwCJyay1P6oxLDgSMUDXCHAfgR0iPYcjS8t3JcNrP+oGnoAGmSSnYyZs/ k9fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=egqhgcTJ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a056a000cca00b005a8d360de63si13309748pfv.336.2023.03.01.03.12.57; Wed, 01 Mar 2023 03:13:10 -0800 (PST) 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=@mediatek.com header.s=dk header.b=egqhgcTJ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229929AbjCALCa (ORCPT + 99 others); Wed, 1 Mar 2023 06:02:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229903AbjCALCV (ORCPT ); Wed, 1 Mar 2023 06:02:21 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C65F239CE2 for ; Wed, 1 Mar 2023 03:02:09 -0800 (PST) X-UUID: 8001859ab82011eda06fc9ecc4dadd91-20230301 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=JujL0zJMof6BeSlvA5bvmTeu3hHrd2enXVP0mfRzsrA=; b=egqhgcTJMRLOXnyC2Ff0GDXNNYeukR0m3xLRRHFCd+mnOv0KWkc568qo0c0p29Vxjn4Ei6J71AJj/05oUc4KGk2qAmCcN1teh94ANqg4KUQBxN6IMxGToEZPeu030fhfBsadFTvqC0lEekh4EsOs+7/LjJAwD66QuPGBoN+TSbs=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.20,REQID:aeb25cc6-fab0-4870-898e-b1242d39c4ad,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:25b5999,CLOUDID:49ab6bf4-ddba-41c3-91d9-10eeade8eac7,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-UUID: 8001859ab82011eda06fc9ecc4dadd91-20230301 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 92384482; Wed, 01 Mar 2023 19:02:04 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Wed, 1 Mar 2023 19:02:03 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Wed, 1 Mar 2023 19:02:03 +0800 From: Trevor Wu To: , , , , CC: , , , , , Subject: [PATCH v2 2/2] ASoC: mediatek: mt8195: add missing initialization Date: Wed, 1 Mar 2023 19:02:00 +0800 Message-ID: <20230301110200.26177-3-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230301110200.26177-1-trevor.wu@mediatek.com> References: <20230301110200.26177-1-trevor.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_SPF_TEMPERROR,UNPARSEABLE_RELAY 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759163648368833218?= X-GMAIL-MSGID: =?utf-8?q?1759163648368833218?= In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop. In the patch, add the missing initialization to fix the unexpected parsing problem. Fixes: 1de9a54acafb ("ASoC: mediatek: mt8195: support etdm in platform driver") Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c b/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c index c2e268054773..f2c9a1fdbe0d 100644 --- a/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c +++ b/sound/soc/mediatek/mt8195/mt8195-dai-etdm.c @@ -2567,6 +2567,9 @@ static void mt8195_dai_etdm_parse_of(struct mtk_base_afe *afe) /* etdm in only */ for (i = 0; i < 2; i++) { + dai_id = ETDM_TO_DAI_ID(i); + etdm_data = afe_priv->dai_priv[dai_id]; + ret = snprintf(prop, sizeof(prop), "mediatek,%s-chn-disabled", of_afe_etdms[i].name);