From patchwork Fri Feb 2 14:06:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 769917 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7DE19C47DB3 for ; Fri, 2 Feb 2024 14:07:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4E7EC844; Fri, 2 Feb 2024 15:07:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4E7EC844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706882841; bh=DK96AZtqKXcd7E3ueqD8K0+F1hQ+KVXSY7KqXeQShHQ=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=U5VJF0z7PBGJIdOg1c0wQ0XW6FoZhudxN7HjbvduvKjbiRj9QEs8KWLIMjaYJRoCb Q7uwGRURPpMjkyWD1uJZvjBD2qdZEwz3Pl9Tf8o0F7xORBWbLDZXYLruHl27j/Ua0x 2rpDNen7ZeW4PNoWKVBf8aP2zd9xUGCIpotAf2ZI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5865BF8058C; Fri, 2 Feb 2024 15:06:49 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 15A56F80588; Fri, 2 Feb 2024 15:06:49 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EEF81F80564; Fri, 2 Feb 2024 15:06:33 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A49A1F8055B for ; Fri, 2 Feb 2024 15:06:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A49A1F8055B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=H+QWqvzT Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 412D1imu023527; Fri, 2 Feb 2024 08:06:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=y MERiJ6dlvpjH7y1c/au/WKWXcDB1zu+AWyPNqt71iI=; b=H+QWqvzTA/vRbc2vV Kim+gIe0k96TphPlHOllmEEvu37dfV/JoFoeQMMxgFkEz5fvN/Ga+7AUEAJmLI0j sYLtPOZNw1E4OVXRsTHxeXSU4LJWeN/NGVThAqUxRB/r2Zl2+nU6nRjvK7yGWC0A LM4IUi7dKeJemRDOs2FgK9cwT7a520rPPXD1HJjsbGXL5Ajf/wYzfiyYc2n3lPM5 j4wHt4KlehJRSfOTecZFCAQdhu0ychop04NoRd4dlWAG86w692oIDPh5QoRT32+u Bop2QwWpjZzcFn/39gtJ4sCuajosgcBDTCznT41G2+FdCUJwvLYBg5rl6aBBfCXR TIJsg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3w0puwgjvy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Feb 2024 08:06:22 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 2 Feb 2024 14:06:19 +0000 Received: from ediswmail9.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.40 via Frontend Transport; Fri, 2 Feb 2024 14:06:19 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 90F21820241; Fri, 2 Feb 2024 14:06:19 +0000 (UTC) From: Charles Keepax To: CC: , , , Subject: [PATCH 1/3] ASoC: cs42l43: Add clear of stashed pointer on component remove Date: Fri, 2 Feb 2024 14:06:17 +0000 Message-ID: <20240202140619.1068560-1-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: x26BZXqQrZSalNTgKJr50zjQA-d1uWXv X-Proofpoint-GUID: x26BZXqQrZSalNTgKJr50zjQA-d1uWXv X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 5TLKBHIBQOHE4USZAICE3ZOWUGJMLVU6 X-Message-ID-Hash: 5TLKBHIBQOHE4USZAICE3ZOWUGJMLVU6 X-MailFrom: prvs=9762917273=ckeepax@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: If the component is removed the stashed component pointer in the CODECs private struct should also be cleared to prevent use of a stale pointer. Signed-off-by: Charles Keepax --- sound/soc/codecs/cs42l43.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c index 2c402086924d..9e1deb3242cb 100644 --- a/sound/soc/codecs/cs42l43.c +++ b/sound/soc/codecs/cs42l43.c @@ -2111,10 +2111,18 @@ static int cs42l43_component_probe(struct snd_soc_component *component) return 0; } +static void cs42l43_component_remove(struct snd_soc_component *component) +{ + struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); + + priv->component = NULL; +} + static const struct snd_soc_component_driver cs42l43_component_drv = { .name = "cs42l43-codec", .probe = cs42l43_component_probe, + .remove = cs42l43_component_remove, .set_sysclk = cs42l43_set_sysclk, .set_jack = cs42l43_set_jack, From patchwork Fri Feb 2 14:06:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 769916 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ACA2DC47DB3 for ; Fri, 2 Feb 2024 14:07:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B24B674C; Fri, 2 Feb 2024 15:07:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B24B674C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706882866; bh=W5b62LBeS6dp8nBRjHKDhK31OtQSA4Ni7+K5BXOBGk8=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=T+fDKJzxjCNIi7Cw8u07xV8++t+TAhDGZeHO1RpHWzF3WjxoDBwlwyq86e+mN1yL5 vUkmES1wlvwrhbIYTGlfBTa3S4eY+Wv1OCtx+4t3E5WDqp51No4P7Sfc1bWn1KUX9m vSaJYx2xGSBThe5Kb+XBmEl4Ib/5LmEMtGlKf+XE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 838D4F805F7; Fri, 2 Feb 2024 15:06:54 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3C68DF805F1; Fri, 2 Feb 2024 15:06:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6953BF8055B; Fri, 2 Feb 2024 15:06:36 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1B6A0F8055C for ; Fri, 2 Feb 2024 15:06:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1B6A0F8055C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=lLbNJiwu Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 412D1imv023527; Fri, 2 Feb 2024 08:06:23 -0600 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=1Fa3BBmlAMFYHyVzM+CIenECxuM4F2GKfdbvgrjNKUM=; b= lLbNJiwu8QW8ty8bOAypiymzaFztkxmFG8FY5CJmpR0fyl/WDcfxnBYk1RXt5zGN uXPKYSRBBHGO+zNMAMW3zFs4lgvsgfhVbMUe7w+z7yOv8tJIQ1PfqusuMNMj/9aZ cQI5HhLVUEl0tIc4Tdg7YYHDyuRPka3WJxavgxW0oLWOsoREMyQUF8BvSiw3+tRo H9LPbZKT3Mji1jo//WV6WFgAS5Jj1bg49wFYB8BxXPk9EORpJkCKWEWmR6E+NUyw g+ctui2JTIxiALT7+UG2iV/KiDxF2PYrjX5ME5Tdu01Dt427KXL/tAjl0ya41KVd pwW+sHo+k5G9CI4cQ/tTDw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3w0puwgjvy-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Feb 2024 08:06:23 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 2 Feb 2024 14:06:19 +0000 Received: from ediswmail9.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.40 via Frontend Transport; Fri, 2 Feb 2024 14:06:19 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 9F414820248; Fri, 2 Feb 2024 14:06:19 +0000 (UTC) From: Charles Keepax To: CC: , , , Subject: [PATCH 2/3] ASoC: cs42l43: Sync the hp ilimit works when removing the component Date: Fri, 2 Feb 2024 14:06:18 +0000 Message-ID: <20240202140619.1068560-2-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240202140619.1068560-1-ckeepax@opensource.cirrus.com> References: <20240202140619.1068560-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: k-nrnSHwJQ7w3l5vCzelP5fDuYAm5xyg X-Proofpoint-GUID: k-nrnSHwJQ7w3l5vCzelP5fDuYAm5xyg X-Proofpoint-Spam-Reason: safe Message-ID-Hash: XBJPUJFURRIZXHAQQNL2NGCHGM4XBGPM X-Message-ID-Hash: XBJPUJFURRIZXHAQQNL2NGCHGM4XBGPM X-MailFrom: prvs=9762917273=ckeepax@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Synchronise the headphone ilimit work functions when removing the component. These can only trigger whilst the headphone is enabled which shouldn't be possible once the component is removed but the works rely on the stashed component pointer so they should be shut down before the code moves on from component remove. Signed-off-by: Charles Keepax --- sound/soc/codecs/cs42l43.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c index 9e1deb3242cb..c84d5952cdb5 100644 --- a/sound/soc/codecs/cs42l43.c +++ b/sound/soc/codecs/cs42l43.c @@ -2115,6 +2115,9 @@ static void cs42l43_component_remove(struct snd_soc_component *component) { struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); + cancel_work_sync(&priv->hp_ilimit_work); + cancel_delayed_work_sync(&priv->hp_ilimit_clear_work); + priv->component = NULL; } From patchwork Fri Feb 2 14:06:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 769242 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8558FC4828F for ; Fri, 2 Feb 2024 14:07:33 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D26689F6; Fri, 2 Feb 2024 15:07:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D26689F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1706882851; bh=gtdmlXQY3OLn5YmXJ11GgVRKkjOWqdeb/x02vSADoYY=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=CybDisDQQgEgtFJQ3YsR7H6KPudLS1qYJBBRKJhk9WtdVCblsYpZMiL0TRMLVu9Oz k+ormVaBRILpNaaiwZFY9sCxjfUl5kNOSOXPC0oo+5bSzcQU5+EoMGFMslwubL1fva ak9/bUxgLmODpTTVg7J4YLvL5dWS01XGdCXRkGR8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 14581F805DA; Fri, 2 Feb 2024 15:06:51 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2C88FF805B2; Fri, 2 Feb 2024 15:06:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 11BA5F80563; Fri, 2 Feb 2024 15:06:35 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 80DC9F80548 for ; Fri, 2 Feb 2024 15:06:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 80DC9F80548 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=NPXOCb/x Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 412D1imt023527; Fri, 2 Feb 2024 08:06:22 -0600 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=D94M7wag6rI2JZlZhW5IHQRabF0OTS5ObHPiw2v4ju4=; b= NPXOCb/xRC1lanpkD+czraqI6eIyNOqfHR19LDQ5hHlgbecTH0KLQHJGkElqTBYZ n9AAX72OIt1JJYX32YpVNEnRBH7yWytv3ntv/XMx5Ah05dP/DnDPJgJDXZEndevE OFrYurBg7MFTsgpl4D8q4HQXyRyVwwwZhtvjwwGnO5XrkdcYk5BtT76VoRJ2YcIN FWwuLYeMsDBDTm45xL/3aTC77Y7B5WfAdBNkTtdgkjpDDVNRkJxzXBfQ4wH3yFyB qclsdobd7YUX7nXz3h8DRzpPdG0KaR1mp8SkhDbTjVsa0bqVQP/OrfdMnB2vfSGT 2ry8fDayJzEQ01VwPWXdlg== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3w0puwgjw0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Feb 2024 08:06:22 -0600 (CST) 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.40; Fri, 2 Feb 2024 14:06:19 +0000 Received: from ediswmail9.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.40 via Frontend Transport; Fri, 2 Feb 2024 14:06:19 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id AB959820249; Fri, 2 Feb 2024 14:06:19 +0000 (UTC) From: Charles Keepax To: CC: , , , Subject: [PATCH 3/3] ASoC: cs42l43: Shut down jack detection on component remove Date: Fri, 2 Feb 2024 14:06:19 +0000 Message-ID: <20240202140619.1068560-3-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240202140619.1068560-1-ckeepax@opensource.cirrus.com> References: <20240202140619.1068560-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 7RmGXc7_beYLZp-WSCk9XowgP4aY3W_5 X-Proofpoint-GUID: 7RmGXc7_beYLZp-WSCk9XowgP4aY3W_5 X-Proofpoint-Spam-Reason: safe Message-ID-Hash: WTCXO67ZTMWIAPU7MRMVQXPLJGXGQWZ3 X-Message-ID-Hash: WTCXO67ZTMWIAPU7MRMVQXPLJGXGQWZ3 X-MailFrom: prvs=9762917273=ckeepax@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Disable the jack detection and sync in any currently running work when the component is removed. Signed-off-by: Charles Keepax --- sound/soc/codecs/cs42l43.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c index c84d5952cdb5..256767ef4c03 100644 --- a/sound/soc/codecs/cs42l43.c +++ b/sound/soc/codecs/cs42l43.c @@ -2115,6 +2115,13 @@ static void cs42l43_component_remove(struct snd_soc_component *component) { struct cs42l43_codec *priv = snd_soc_component_get_drvdata(component); + cs42l43_set_jack(priv->component, NULL, NULL); + + cancel_delayed_work_sync(&priv->bias_sense_timeout); + cancel_delayed_work_sync(&priv->tip_sense_work); + cancel_delayed_work_sync(&priv->button_press_work); + cancel_work_sync(&priv->button_release_work); + cancel_work_sync(&priv->hp_ilimit_work); cancel_delayed_work_sync(&priv->hp_ilimit_clear_work);