Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1542412rwi; Thu, 20 Oct 2022 13:57:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Wb+YXAmxcJkJR8noGiv6s0ofh17f0yKY3tCZOu/TxDoiLOOjd8gMWuxcIN7iD54zI4X5I X-Received: by 2002:a17:907:c15:b0:78d:af58:4274 with SMTP id ga21-20020a1709070c1500b0078daf584274mr12728814ejc.150.1666299436719; Thu, 20 Oct 2022 13:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666299436; cv=none; d=google.com; s=arc-20160816; b=T+CUtDmG2Q3hPAIJ424lAgXgb3fbr2xO0vO8D7ZdLYHYDEAonSIJi9Yoo6BUrz9ShB IhZegeMAMtoavTpHvZgZSelxo2mKClNdHHzfWe4VEPWpwvEHeZCKgNzqlYYXqeVtkrcy MwZ3U97DICh4yptBW+ysTpQV/EI0xoEGxx/uVJXYHIioZFQOMqa9iDAHp6FO6Yp3zdLd /Z/1xx0gVllZ7zerLejIoYsMYYbMINNb43MOnliU4c81kpNdKPZo3osmym1USAwbveqG L3yRwYmqPvdWlHp9Avw3W4EUxoIQaANmzo1F+qwPnEXtBDF/MuCovJNdYVAa9WBTFabm /TSg== 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; bh=tvMAfDZYwsEuZciMyTG0kmHNr3e12NZWFmA6tvxfFeQ=; b=NGnqDbzZotGkNs12AK0p80bbzXrcjjdvQGz8e2JT+mMZtPGxTjMAfwnRvWsTq+Tx1U NHq1VRimKS9SzdiLXdXZTpIt95HYeEoL3a/ElLZKTVmmZJ1ebaft+/fCLNGo9/VpzMzE 3IJPjkGzeMWvkvhyZ928c362YR0kiNzdQ58hEMs41UwvuSUjmF7EECee06XassospAzF voJxQsjmcdO2TLO7fFE2Vp6JDE7jjZy54Iy1eKDd9CASue/4irWo4PC1pVMr8m7G9vh1 HY++hgTzRcgFqvcPMAtgarQz5aF3G4gCiQUCrd7ttJacJbkSNQ2j07Aj+Sq+u37iTS5G oDkQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg35-20020a170907a42300b0078234266a78si18210825ejc.894.2022.10.20.13.56.51; Thu, 20 Oct 2022 13:57:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229917AbiJTUrr (ORCPT + 99 others); Thu, 20 Oct 2022 16:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbiJTUri (ORCPT ); Thu, 20 Oct 2022 16:47:38 -0400 Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABF5521F96D for ; Thu, 20 Oct 2022 13:47:26 -0700 (PDT) Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1olcRE-0007V3-Jm; Thu, 20 Oct 2022 22:46:48 +0200 From: "Maciej S. Szmigiero" To: Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] ALSA: hda/realtek: Use snd_ctl_rename() to rename a control Date: Thu, 20 Oct 2022 22:46:23 +0200 Message-Id: <37496bd80f91f373268148f877fd735917d97287.1666296963.git.maciej.szmigiero@oracle.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 From: "Maciej S. Szmigiero" With the recent addition of hashed controls lookup it's not enough to just update the control name field, the hash entries for the modified control have to be updated too. snd_ctl_rename() takes care of that, so use it instead of directly modifying the control name. Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups") Cc: stable@vger.kernel.org Signed-off-by: Maciej S. Szmigiero --- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 79acd2a2caf20..9945861f02efa 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2142,7 +2142,7 @@ static void rename_ctl(struct hda_codec *codec, const char *oldname, kctl = snd_hda_find_mixer_ctl(codec, oldname); if (kctl) - strcpy(kctl->id.name, newname); + snd_ctl_rename(codec->card, kctl, newname); } static void alc1220_fixup_gb_dual_codecs(struct hda_codec *codec,