From patchwork Mon Jun 3 10:35:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Trimmer X-Patchwork-Id: 801274 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 729B5C25B76 for ; Mon, 3 Jun 2024 10:36:27 +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 B5EF8E67; Mon, 3 Jun 2024 12:36:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B5EF8E67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1717410985; bh=fY7MkT5JoP238inIzvp80l8R/QuTlnYxL8jXzTxaxIk=; 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=dLm54BNyDu5l9NzNNZ8QEwESECF3xclCGd6mWRtCeIR5XLuD9k7LgEA56h2/NrBy+ k34GzDuk8eNeQVY57BgwfVMGzIReeFAkXychI17/ILIJ/5xvRQSNSjElDPZfUltSGW utSsoj3GSNlhY3Iv3xqG0q0TbL/UYzpIlzSjlCsI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5FBF1F805C7; Mon, 3 Jun 2024 12:35:44 +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 9FF15F805D8; Mon, 3 Jun 2024 12:35:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A076F804FF; Mon, 3 Jun 2024 12:35:37 +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 CBE8CF8025A for ; Mon, 3 Jun 2024 12:35:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CBE8CF8025A 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=esInwkes 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 4535l7pa018316; Mon, 3 Jun 2024 05:35:30 -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=/31H52Kx5dI0pIOnMzUjAMQTByFunlPMmeUhLGzbe3M=; b= esInwkesGZxuY9WQXAW7bal3RcRess6/NZTC8VqIo0F+OvOWc5Phky2+XofLecqs eos08IUjLrBlnCcXaYRIbSp3ut4ZSClomMxz0wLpH/gmDIi4xbNJZh8loNuKbyea gT9FDk4716U7GOwJDp2P+ynzdMOWXmfUMG8HNuNE8r5fh63bvqSU9J7pXgGODZor zETJ8vEcHd5apv0lGm23g/q2+afrZHBJz0IRL7I8DbbGpMYN/HyvuaRT7IZHtIDu jZXx7MyY1e1Kpq/4urjd/8ut/gO2Q0/DeraQl3BEmQwMRpbkKYA73+WxSfWe9ord FTRJ1lN49oS5Z17euLj6Vw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3yg11xscbq-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 05:35:29 -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; Mon, 3 Jun 2024 11:35:27 +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; Mon, 3 Jun 2024 11:35:27 +0100 Received: from EDIN6ZZ2FY3.ad.cirrus.com (EDIN6ZZ2FY3.ad.cirrus.com [198.61.64.166]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id C6AB0820249; Mon, 3 Jun 2024 10:35:26 +0000 (UTC) From: Simon Trimmer To: CC: , , , , , , , , , Simon Trimmer Subject: [PATCH 2/7] ALSA: hda: cs35l41: Component should be unbound before deconstruction Date: Mon, 3 Jun 2024 11:35:19 +0100 Message-ID: <20240603103524.32442-3-simont@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240603103524.32442-1-simont@opensource.cirrus.com> References: <20240603103524.32442-1-simont@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: arj-FzRXEhriQRbaUqWCkdnBZsMDL4Dg X-Proofpoint-ORIG-GUID: arj-FzRXEhriQRbaUqWCkdnBZsMDL4Dg X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 2PNTFZCTQHIAS75X7QYYMLDU24IUJ2N5 X-Message-ID-Hash: 2PNTFZCTQHIAS75X7QYYMLDU24IUJ2N5 X-MailFrom: prvs=388426604e=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. 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);