Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp91947pxb; Mon, 13 Sep 2021 13:51:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9P0gkYBedsdpu2IiujhuLSmp4xdpKmtTVKY6stmt6qmr5WNbpx8k4gffkBrEWKOThwsEP X-Received: by 2002:a17:906:3845:: with SMTP id w5mr14648166ejc.22.1631566284965; Mon, 13 Sep 2021 13:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631566284; cv=none; d=google.com; s=arc-20160816; b=mFp6qf07r4bFSfRNxqs7YphXuPsqKcu9uEWV9Yk0LGv6h7uDLiy177sV6blFVpIWqh fUR730gLz8YJKN4iYbBhxZeRg+c9q2dhN2FNfMPUZ7vhAtzzPYw4MN0vNheiM24wWc9i 0VKnogZenx7H8zTMIDNdHGXbm7a4N+y405CRJQBPWZoE2lNgCtBbSlOlP+VeKIc63NeS JEjkA92YTaUkRULOiOvvFy+uAvZVorqyH6iLo4w1y7mcPW6YK2UNrK5tmXC5Issv2HY0 5YgPQ77+ECOzXGth/DWL4jkr1iFPNS96D6b4snpiq9Ng0grII1rTYfrnQ1cL9ATMfq06 WHWg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K9eKr5ghxYU8Zs+QrKHomiwQVzz39ZyXoax5bYdBXmc=; b=nTVhszgiCmESq2AEwOLqpGe0Gbxfdy0MQNuwrce1Ql2WPRMCjeUhlpxDWOBVP5t7Jm sYpYZQhj47VfHGEop24TndxxlZ9oQEAyeSRYcr7YpKlGcCyDybkTspuoNhGfwhunOrzH rCrC7x2OvKtH9GwtL7YbKNgGrMHTSXG9OyxlWxGucD6da2bkUQuWmnjZjKZMuszQPNSr 59ea1XAtXwUjsqP0HID4ms6+StVe22pEDVMqUrvC7GDvkt4LKmoShyOv3JMlN1qNWqXc TrYrPO72Wxz6dn480jESyGEP/WRwLVg5C8wFC7TR0K6PZVaGcfHDYMd5/gHhg1kPGd7j +sYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dsXYYeiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k28si6910757edk.420.2021.09.13.13.50.46; Mon, 13 Sep 2021 13:51:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dsXYYeiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244468AbhIMNt2 (ORCPT + 99 others); Mon, 13 Sep 2021 09:49:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:51886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243786AbhIMNoz (ORCPT ); Mon, 13 Sep 2021 09:44:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6FF126121D; Mon, 13 Sep 2021 13:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539887; bh=6R9i/MUiyyRFiuFwq4cbJ+XJmXhDhnX6jVtEc/sMmX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dsXYYeiu6NOgXnDfzEtimolRNW/i8sA4O/MV9hnaKf8tLDuwtMtOLmFcJspZVAQAX eLYHpFoU446peEEfn7XGFC0w3Q/AaCi3gQW9klg7RYcIHCoM0wL7AandEgqpIT1Mkc ip/dYpSfJbhtv0HzKBWCz0Nq4VxL26ty1TLp0Dew= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Mark Brown , Sasha Levin Subject: [PATCH 5.10 199/236] ASoC: wcd9335: Disable irq on slave ports in the remove function Date: Mon, 13 Sep 2021 15:15:04 +0200 Message-Id: <20210913131107.150517532@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit d3efd26af2e044ff2b48d38bb871630282d77e60 ] The probe calls 'wcd9335_setup_irqs()' to enable interrupts on all slave ports. This must be undone in the remove function. Add a 'wcd9335_teardown_irqs()' function that undoes 'wcd9335_setup_irqs()' function, and call it from the remove function. Fixes: 20aedafdf492 ("ASoC: wcd9335: add support to wcd9335 codec") Signed-off-by: Christophe JAILLET Message-Id: <8f761244d79bd4c098af8a482be9121d3a486d1b.1629091028.git.christophe.jaillet@wanadoo.fr> Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wcd9335.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 7f758728f403..2677d0c3b19b 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -4076,6 +4076,16 @@ static int wcd9335_setup_irqs(struct wcd9335_codec *wcd) return ret; } +static void wcd9335_teardown_irqs(struct wcd9335_codec *wcd) +{ + int i; + + /* disable interrupts on all slave ports */ + for (i = 0; i < WCD9335_SLIM_NUM_PORT_REG; i++) + regmap_write(wcd->if_regmap, WCD9335_SLIM_PGD_PORT_INT_EN0 + i, + 0x00); +} + static void wcd9335_cdc_sido_ccl_enable(struct wcd9335_codec *wcd, bool ccl_flag) { @@ -4878,6 +4888,7 @@ static void wcd9335_codec_remove(struct snd_soc_component *comp) struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); wcd_clsh_ctrl_free(wcd->clsh_ctrl); + wcd9335_teardown_irqs(wcd); } static int wcd9335_codec_set_sysclk(struct snd_soc_component *comp, -- 2.30.2