Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10225203rwr; Fri, 12 May 2023 05:40:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KCiHA5Krn0wztVGJSwoAjCl32RI8K1W2HaDqQE4B+5FjVsPYhQHO6AfwJjxj1J/8rGWAr X-Received: by 2002:a05:6a20:9192:b0:f3:2d33:de72 with SMTP id v18-20020a056a20919200b000f32d33de72mr30936888pzd.21.1683895217702; Fri, 12 May 2023 05:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683895217; cv=none; d=google.com; s=arc-20160816; b=ovQO9V19cMCi2ZkOtbsDyWB8NXV0tAJbXwHi629OHN00VyXXaNK6x+SxK0bB97cQ4F xz5deURtUVzhmfpwhmr1r9zvcL/0wjdivhB32q2jK/4E1K7oJ9z9ROUecaRdbaxMoz1c TKLjA+wraUkir8p+jqm1nr3hRkGcAQrv2DnrV3xUCGx9yxKPPBjrFX7qQvl0i3uOx5PC 795H1rs7/mg96sR+ZhZVJlp/m1LO/b0xwaEKMYUUTA/emCAU8z8i5IqP0/7GSXW6laCN R+qhGXVvXYOCRdOnipBXn0g0esGImjwYMfOnON+sthtN9rLuZruZXbvJ0Mf/aIZ7Jkdk REOw== 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 :dkim-signature; bh=FF0MGgoGVYiyUdoLzrNTfui4hZc7QAdyPV9+R56x+60=; b=nLas4P3DGbugC4WnIptSyyiznH1RqDV+d5sVymvMzb6pzGcKF3GwJd+A7t3+DjZGWd hs+VjSCW4e1kLjQTXxa6Ps14UiN5Ke8gkh5O9Vd3SfrWUqaMgPejf7ELvd/YjGRhcq9i VBDx9AICsvVmOmDyUbpsKurXKGuPt9a8z9Dqm2HjCcwVY+vB+cz0g7ceW2SAbr5MDbbT vbp/c4Ro6XZAH+H/p9xzvhyatmCbowi+jEPziXBKh1ZFEo9S41g9yeZntvJVsfwATjqb E94nMYr1eBeNn2TUEVoHEBoi+6OCERrSSefGXBwAZvB4u2ZpX54hy3l8km4yBaVINACE RbBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Er69sx5m; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y192-20020a638ac9000000b00527d158ec73si9647801pgd.3.2023.05.12.05.40.02; Fri, 12 May 2023 05:40:17 -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; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Er69sx5m; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241143AbjELMaY (ORCPT + 99 others); Fri, 12 May 2023 08:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240546AbjELM36 (ORCPT ); Fri, 12 May 2023 08:29:58 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 173AE1437A; Fri, 12 May 2023 05:29:23 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34C5eUj8031128; Fri, 12 May 2023 07:28:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=FF0MGgoGVYiyUdoLzrNTfui4hZc7QAdyPV9+R56x+60=; b=Er69sx5mItoC7ting41wXRkLDp8b5HO8s/fGyGkzhxBF+20TAD3DNqAeairtfRj2D38l 7g17wC1+wGuZJyemUmRYv4eD2J9+I4gNNMP4uGmnz4y8jAB5dNT84mlw9GdjzHHc1EuR neKDzdPlX3s2bX5ChnlLn5yCXeV+2+XElpxubkHW0OvRRBrGitDGBgCsHtcAPg9TXzGV mYKOOs1ngblrB97SiHiQ0gFUmQzYayn+k+f9L2vXAZgskzj1hNM1y2fj5A+qJpQs2TW2 92/k+82n1QHInNcC6QKtawwmdfRQjDa2m6OL/Y7oq9/cJDE0LfIOj6CHRc+pl7bNXW+t zA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3qf7s46b2x-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 07:28:40 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 12 May 2023 07:28:38 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 12 May 2023 07:28:38 -0500 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 5829715A4; Fri, 12 May 2023 12:28:38 +0000 (UTC) From: Charles Keepax To: , , , , , , , , CC: , , , , , , , , , Subject: [PATCH 03/10] ASoC: ak4118: Update to use new component control notify helper Date: Fri, 12 May 2023 13:28:31 +0100 Message-ID: <20230512122838.243002-4-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230512122838.243002-1-ckeepax@opensource.cirrus.com> References: <20230512122838.243002-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: tR8CwHcEE0q8AMCU_M3wg1mquGdZccCi X-Proofpoint-GUID: tR8CwHcEE0q8AMCU_M3wg1mquGdZccCi X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Update the driver to use the new ASoC core control notify helper. This also fixes a bug where the control would not be found if the CODEC was given a name prefix. Signed-off-by: Charles Keepax --- sound/soc/codecs/ak4118.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/ak4118.c b/sound/soc/codecs/ak4118.c index b6d9a10bdccdc..74ccfb0d921d6 100644 --- a/sound/soc/codecs/ak4118.c +++ b/sound/soc/codecs/ak4118.c @@ -264,8 +264,6 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data) struct ak4118_priv *ak4118 = data; struct snd_soc_component *component = ak4118->component; struct snd_kcontrol_new *kctl_new; - struct snd_kcontrol *kctl; - struct snd_ctl_elem_id *id; unsigned int i; if (!component) @@ -273,13 +271,8 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data) for (i = 0; i < ARRAY_SIZE(ak4118_iec958_controls); i++) { kctl_new = &ak4118_iec958_controls[i]; - kctl = snd_soc_card_get_kcontrol(component->card, - kctl_new->name); - if (!kctl) - continue; - id = &kctl->id; - snd_ctl_notify(component->card->snd_card, - SNDRV_CTL_EVENT_MASK_VALUE, id); + + snd_soc_component_notify_control(component, kctl_new->name); } return IRQ_HANDLED; -- 2.30.2