From patchwork Fri Sep 8 10:17:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 721104 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 3F151EE57F1 for ; Fri, 8 Sep 2023 10:18:57 +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 ED9C993A; Fri, 8 Sep 2023 12:18:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ED9C993A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694168335; bh=bOG4ImyC/oRx31Iu3ay/VC5I95TsUYgTSSyGrVu7fZs=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=JA1iGCWO4bMy2OkqBHaM1K7xMZMT2yklFyJ4Z/JdrauSCjzkw0Tng/lDSZuuOw/2b Rhha5sGlrqR+hGns3GPYg0pICow9FIUApvkim8P0mlQi/Q/B8zKMG9r5xCVwoJbGLr jQEzOODqfLfSONNeq7zQ5Chx2UatPaNsEWh4H8ak= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B0F10F80551; Fri, 8 Sep 2023 12:17:28 +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 11D2AF804F3; Fri, 8 Sep 2023 12:17:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B12D6F80494; Fri, 8 Sep 2023 12:17:24 +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 B77E8F800F5 for ; Fri, 8 Sep 2023 12:17:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B77E8F800F5 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=UrvJZJca Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3886w1ct023995; Fri, 8 Sep 2023 05:17:18 -0500 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=/ W1tPdE5V7gzD7bdUbDHgstk21GMGqWe6S5SZYdOVXU=; b=UrvJZJcacQqCE9t1d GJbBbh2rXEpAAAblgy6ABmmkryjZDQ6gzDmByfpWat1+SGQPyPDSsP14eERvVC5d VKckDfrqn9RyO9nxaKWfGS4O9E2xuEUZW4QMe9mcBCe/TyYTA8y5LuZzYAuvjk4G ViMRgIYBPKLlJSL6RanPTJfmDX0bJBdyOhqMXP1vpJJCaV+bzZx6obU2ewAtXaKq RnqpR49GPLgNFdheHP2Dp6V1JLkG+TUlqAxcmNlxYvMiOwMDpLJ5+2w99uXCD2jV oRjRbtBDXfTCa83eVc1hFFJUxLLLqfz9klYoS+iRcSvkZknZ7jKaLnqHnBor0gy4 C0W8A== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3sv2ex7vtp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Sep 2023 05:17:18 -0500 (CDT) 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.37; Fri, 8 Sep 2023 11:17:16 +0100 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.37 via Frontend Transport; Fri, 8 Sep 2023 11:17:16 +0100 Received: from edi-sw-dsktp-006.ad.cirrus.com (edi-sw-dsktp-006.ad.cirrus.com [198.90.251.125]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 790E211AA; Fri, 8 Sep 2023 10:17:16 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH] ASoC: cs35l56: Call pm_runtime_dont_use_autosuspend() Date: Fri, 8 Sep 2023 11:17:16 +0100 Message-ID: <20230908101716.2658582-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: Zwh6kz_GL3q9JzEel03TLkBUi2GrakWm X-Proofpoint-GUID: Zwh6kz_GL3q9JzEel03TLkBUi2GrakWm X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 3WPNHC6BK334RP6NMSZJNOILSNYWF7LZ X-Message-ID-Hash: 3WPNHC6BK334RP6NMSZJNOILSNYWF7LZ X-MailFrom: prvs=46155e09a2=rf@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.8 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: Driver remove() must call pm_runtime_dont_use_autosuspend(). Drivers that call pm_runtime_use_autosuspend() must disable it in driver remove(). Unfortunately until recently this was only mentioned in 1 line in a 900+ line document so most people hadn't noticed this. It has only recently been added to the kerneldoc of pm_runtime_use_autosuspend(). THIS WON'T APPLY CLEANLY TO V6.5 AND EARLIER: We will send a separate backported patch to stable. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index 600b79c62ec4..f2e7c6d0be46 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -1207,6 +1207,7 @@ void cs35l56_remove(struct cs35l56_private *cs35l56) flush_workqueue(cs35l56->dsp_wq); destroy_workqueue(cs35l56->dsp_wq); + pm_runtime_dont_use_autosuspend(cs35l56->base.dev); pm_runtime_suspend(cs35l56->base.dev); pm_runtime_disable(cs35l56->base.dev);