From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF203C4332F for ; Wed, 2 Nov 2022 02:35:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229741AbiKBCfH (ORCPT ); Tue, 1 Nov 2022 22:35:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbiKBCfG (ORCPT ); Tue, 1 Nov 2022 22:35:06 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B249564FD for ; Tue, 1 Nov 2022 19:35:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 22EBAB82070 for ; Wed, 2 Nov 2022 02:35:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E17F1C433D6; Wed, 2 Nov 2022 02:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1667356502; bh=KmdDaoZ4hGu/NWFVxaEx21483ahDP2pe25EnS3BxNZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GgJGp1LODeEotjSoFyQj5sg0vwL+hydfWxBT1jK6qUd4DSEH5zFgrnuDTUF+cfMRD ONMjxLWubY29ElzgaqmCsG+Cpmr96Yw1lE/No9lmg0pUhkR4J4Y/+vfT53psXgsqvO sczVFRA3Nh0Rr271ObnBmipUWm/eKGOLe9S6VCyg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Maciej S. Szmigiero" , Takashi Iwai Subject: [PATCH 6.0 011/240] ALSA: hda/realtek: Use snd_ctl_rename() to rename a control Date: Wed, 2 Nov 2022 03:29:46 +0100 Message-Id: <20221102022111.663733576@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102022111.398283374@linuxfoundation.org> References: <20221102022111.398283374@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Maciej S. Szmigiero commit b51c225376a684d02fb58b49cf0ce3d693b6f14b upstream. 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 Link: https://lore.kernel.org/r/37496bd80f91f373268148f877fd735917d97287.1666296963.git.maciej.szmigiero@oracle.com Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2141,7 +2141,7 @@ static void rename_ctl(struct hda_codec 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,