Message ID | 38b19f019f95ee78a6e4e59d39afb9e2c3379413.1666296963.git.maciej.szmigiero@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp316205wrr; Thu, 20 Oct 2022 13:49:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6tXa13InEz1Lyu1EHeFKL7gfDkShYT2QQSnGfWiKah1Dno4eoHyhevstuetK1rClMrzq8E X-Received: by 2002:a17:907:2672:b0:781:dc01:6c5a with SMTP id ci18-20020a170907267200b00781dc016c5amr13014696ejc.191.1666298942054; Thu, 20 Oct 2022 13:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666298942; cv=none; d=google.com; s=arc-20160816; b=JHzFRTTY14yqVmw1/7QNouOduPVa/hZ6JdKysSHiTPP0Vytmjh8tYWMw3JjZSUXy8V lbbG+7OY2lCY0fRFrh0F5MaHQ2NaKw8NxI6YW74kN27eiCTyYSw0KPn/omIs8mvtCzTI N2MhIHOY5q+guiOxaZcte41so2sQYIXtsMEfcDEvb+7yg46xp0gYeaAKEBabuLszOpVJ IFzoQW/5tcgUox3tcRne+NtSfhvA91EICqedPBDat72kC9ne/MJ9YIsitsKpfpI2K4Vb +qPh9Z5AoEMU/O3DOWPaqjK76WI915Foc6I4ljllq/hmSafl2vBd3mpigI1icZTEAN3R NuLQ== 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=hnyG35U0aq3+xPn0XjULIJimyqgTlJsM7cpIx785M1o=; b=D+Ps+eFYR1aMS9dkelyuiIEwIZM932VMernxY9ZgMUpOOUHsgkDiKmNsWO9Go4W6g8 BP7siF64fMwQl9Ru+u/7ges78dYukINyd540iJ6qxHMkl8qmmWiCbe1TIcOQl6IjKzRJ Ly1k7PCZzomBJOHv4i1S3rWgBH05JBPvvAHAEyRmeBG5lwe+Gk/27ZVGGNYB8D8t64nF DNlrKt5jK5Gqo+MlP3hsOfH7aD6wSu5bntvx0cdwurYyeQwYkdad9PDSChzau7O2oB9c FfQOLViaGA+crll3TShxerZ6wekVYUEcwh9MogBALk7/5JeOhETdilmqMrbockGNVIV4 TphQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd41-20020a1709076e2900b0078c2c22d6cesi18896926ejc.70.2022.10.20.13.48.37; Thu, 20 Oct 2022 13:49:02 -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 S229635AbiJTUrw (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Thu, 20 Oct 2022 16:47:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbiJTUrl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Oct 2022 16:47:41 -0400 Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CBDB21A848 for <linux-kernel@vger.kernel.org>; Thu, 20 Oct 2022 13:47:29 -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 <mail@maciej.szmigiero.name>) id 1olcRJ-0007VG-Ty; Thu, 20 Oct 2022 22:46:53 +0200 From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] ALSA: emu10k1: Use snd_ctl_rename() to rename a control Date: Thu, 20 Oct 2022 22:46:24 +0200 Message-Id: <38b19f019f95ee78a6e4e59d39afb9e2c3379413.1666296963.git.maciej.szmigiero@oracle.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <cover.1666296963.git.maciej.szmigiero@oracle.com> References: <cover.1666296963.git.maciej.szmigiero@oracle.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747241079632670095?= X-GMAIL-MSGID: =?utf-8?q?1747241079632670095?= |
Series |
Fix direct renaming of hashed controls
|
|
Commit Message
Maciej S. Szmigiero
Oct. 20, 2022, 8:46 p.m. UTC
From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com> 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 <maciej.szmigiero@oracle.com> --- sound/pci/emu10k1/emumixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index e9c0fe3b84461..3c115f8ab96c0 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -1767,7 +1767,7 @@ static int rename_ctl(struct snd_card *card, const char *src, const char *dst) { struct snd_kcontrol *kctl = ctl_find(card, src); if (kctl) { - strcpy(kctl->id.name, dst); + snd_ctl_rename(card, kctl, dst); return 0; } return -ENOENT;