From patchwork Thu Jun 13 13:37:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Trimmer X-Patchwork-Id: 804180 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 CD50AC27C6E for ; Thu, 13 Jun 2024 13:38:53 +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 E9836E72; Thu, 13 Jun 2024 15:38:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E9836E72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718285932; bh=Lwy6HFEz39WeBa2VaGtb1Rv34jXLY5ZgoXJfpQDommo=; 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=HlSldKpqCZy1mcip7aNYqMEV1Oi89QJXFABz/7FZN+Lpzgo8kiNhO8dYS/HxmrYTe PTSBFry6qGortOAh0cfmxRrAAVdRzDN+0RptU6H5j7zVi0HyJSliDkaD1c8RHK/tvX 4bCRl0EbrY6n+g23uL0/iSW0Me1YYRnX4wnZ8toc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8FDEDF805D8; Thu, 13 Jun 2024 15:38:10 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7139DF805E4; Thu, 13 Jun 2024 15:38:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 91A19F805C5; Thu, 13 Jun 2024 15:38:05 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 ED8FDF805BD for ; Thu, 13 Jun 2024 15:38:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ED8FDF805BD 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=qJLSehwk Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45D4lvch009171; Thu, 13 Jun 2024 08:38:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=6WWYE9TVIgmEpxhrHtH2XIwJkHDI0lwDzKrfFPemTm8=; b= qJLSehwkz47lbcZBCQWJJ63jVsxpXmawzZ5loXD54jGvKLlFpNRZYkxnSWMQK4Bv SvC3lbsq9pT4xXkOGA0iY2ceDTMswQRwFqY+HJ4kwRQtz4UuHY45h08F1JnTgnlB x/HOGCoKI+oqMpCsCW7wzKnwQjiXfGWt7pkhqUMerxsGc7RjRtjA6PZtFdd3Mb63 VJdiae4L3EVUE6UcNgptEacZAh/jbopJGd/ilmnTvdm2+qTrohJ8OM9VO1K0WUtt cEOd4khBPADt9j+RD5o3qmSoQPd5tlggoTQJ7oqcR0LuSGnZ85JpekX3YaOOcI1m cZKEv6OAIfdFIQ6yOfDakA== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3yqb8ehcdq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 08:37:59 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) 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.1544.9; Thu, 13 Jun 2024 14:37:51 +0100 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1544.9 via Frontend Transport; Thu, 13 Jun 2024 14:37:51 +0100 Received: from EDIN6ZZ2FY3.ad.cirrus.com (EDIN6ZZ2FY3.ad.cirrus.com [198.61.65.41]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id C2679820248; Thu, 13 Jun 2024 13:37:50 +0000 (UTC) From: Simon Trimmer To: CC: , , , , , , , , Simon Trimmer Subject: [PATCH 1/3] ALSA: hda: cs35l56: Component should be unbound before deconstruction Date: Thu, 13 Jun 2024 14:37:11 +0100 Message-ID: <20240613133713.75550-2-simont@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240613133713.75550-1-simont@opensource.cirrus.com> References: <20240613133713.75550-1-simont@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: QbWChKkYjmEn4W1GZPSUCiQa5yDNTf3P X-Proofpoint-GUID: QbWChKkYjmEn4W1GZPSUCiQa5yDNTf3P X-Proofpoint-Spam-Reason: safe Message-ID-Hash: FGFRIGWRY2IO6IPTNH3APS5HIWN2OKEN X-Message-ID-Hash: FGFRIGWRY2IO6IPTNH3APS5HIWN2OKEN X-MailFrom: prvs=38942f2995=simont@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: The interface associated with the hda_component should be deactivated before the driver is deconstructed during removal. Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Signed-off-by: Simon Trimmer --- sound/pci/hda/cs35l56_hda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c index 0923e2589f5f..e134ede6c5aa 100644 --- a/sound/pci/hda/cs35l56_hda.c +++ b/sound/pci/hda/cs35l56_hda.c @@ -1077,12 +1077,12 @@ void cs35l56_hda_remove(struct device *dev) { struct cs35l56_hda *cs35l56 = dev_get_drvdata(dev); + component_del(cs35l56->base.dev, &cs35l56_hda_comp_ops); + pm_runtime_dont_use_autosuspend(cs35l56->base.dev); pm_runtime_get_sync(cs35l56->base.dev); pm_runtime_disable(cs35l56->base.dev); - component_del(cs35l56->base.dev, &cs35l56_hda_comp_ops); - cs_dsp_remove(&cs35l56->cs_dsp); kfree(cs35l56->system_name); From patchwork Thu Jun 13 13:37:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Trimmer X-Patchwork-Id: 804179 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 68B84C27C6E for ; Thu, 13 Jun 2024 13:39:18 +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 926019F6; Thu, 13 Jun 2024 15:39:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 926019F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1718285956; bh=Rsa9LIJVLCfEEDfRcJqmUcTi+WPu7QmEWLsbETwevYo=; 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=WSey/eIzv0JI8Ri84ZQNR0we89kiArb/27zYQ1M/Y9kvPRtIoL/m79/rEpsOzQxZq aCQtpxKyIzyHJTQzNYF8ND4ubcU39zbukbq6PAderLCcvnh8fG5JpJqT/FrH1jQizf SQSOljIvrYkV13jL4j7qvCf9yc26PJxgDr64bY9k= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D58A8F80624; Thu, 13 Jun 2024 15:38:15 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 34922F805FB; Thu, 13 Jun 2024 15:38:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 93730F805E0; Thu, 13 Jun 2024 15:38:10 +0200 (CEST) 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 D1030F80448 for ; Thu, 13 Jun 2024 15:38:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D1030F80448 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=nbeDsZIQ Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45D4iWlr013712; Thu, 13 Jun 2024 08:38:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=S5+j64neUDQ+dJuwRMUcq1jrgKa4cIarmoNF4x/Fz/I=; b= nbeDsZIQddeRfaSxJnGNOMQlWBLcT4pfNOpyMaYtgwmEiMgnvwne4fLeeAb88rTT Dm+kr2BqXufz8MASwbYDF4m3AHgN34Vq2gt4wISw0VvmJyckS7J/MP0hgTyfo7BS Dvy27/prA0ApZB1wqlpVUQ9DXFAjK+BxXwFRZpJ+wmfH/HOQ/GIqmGSJ1+jKk9CU hDiDfEiLNyZ/WO6Cn1D5qtbHJdUOo6wJJzbRUvFwYvDqsqmLXuLCRSer11I7M4Vi kXRKjRbK8A36KDR/77YIhauP5QSRB9CLIFemY4ZTEM7pJpcbS1/2y2wt5ilpOiKP UN5ICaN3m2O5os433k864g== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3yqskgreva-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 08:38:05 -0500 (CDT) 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.1544.9; Thu, 13 Jun 2024 14:37:55 +0100 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.1544.9 via Frontend Transport; Thu, 13 Jun 2024 14:37:55 +0100 Received: from EDIN6ZZ2FY3.ad.cirrus.com (EDIN6ZZ2FY3.ad.cirrus.com [198.61.65.41]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id E4790820248; Thu, 13 Jun 2024 13:37:54 +0000 (UTC) From: Simon Trimmer To: CC: , , , , , , , , Simon Trimmer Subject: [PATCH 2/3] ALSA: hda: cs35l41: Component should be unbound before deconstruction Date: Thu, 13 Jun 2024 14:37:12 +0100 Message-ID: <20240613133713.75550-3-simont@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240613133713.75550-1-simont@opensource.cirrus.com> References: <20240613133713.75550-1-simont@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: ZUQfwjpz7gjGbeVXX6N9VTg_IYKDCY5r X-Proofpoint-ORIG-GUID: ZUQfwjpz7gjGbeVXX6N9VTg_IYKDCY5r X-Proofpoint-Spam-Reason: safe Message-ID-Hash: AWNQFKLEM36I43PHX3USJH2R4H3VX6UZ X-Message-ID-Hash: AWNQFKLEM36I43PHX3USJH2R4H3VX6UZ X-MailFrom: prvs=38942f2995=simont@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: The interface associated with the hda_component should be deactivated before the driver is deconstructed during removal. Fixes: 7b2f3eb492da ("ALSA: hda: cs35l41: Add support for CS35L41 in HDA systems") Signed-off-by: Simon Trimmer --- sound/pci/hda/cs35l41_hda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index d54d4d60b03e..031703f010be 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -2019,6 +2019,8 @@ void cs35l41_hda_remove(struct device *dev) { struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev); + component_del(cs35l41->dev, &cs35l41_hda_comp_ops); + pm_runtime_get_sync(cs35l41->dev); pm_runtime_dont_use_autosuspend(cs35l41->dev); pm_runtime_disable(cs35l41->dev); @@ -2026,8 +2028,6 @@ void cs35l41_hda_remove(struct device *dev) if (cs35l41->halo_initialized) cs35l41_remove_dsp(cs35l41); - component_del(cs35l41->dev, &cs35l41_hda_comp_ops); - acpi_dev_put(cs35l41->dacpi); pm_runtime_put_noidle(cs35l41->dev);