From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796291179; b=fYINYJGXirWazmV5oe0ZJ/qosOjSw+cts5CNv/n5RtGwbTHa2MGQv+JGzShOIvUvPi3O ynVYwaSiGT21jGMIpftdqzyMxfXueEoVzax/RXjJ664zBFQ3aIY/KSZR0CkaXiYEJEuZw stMPYpcXpgGL1936vUrHhYsmakl5NOp8puAXJssxzVz5Candl6yxLAanlYh907Rj5p7A7 Y4inraO1bLqNrx82l4CFED+1hqabBiTtRn8LL1zavTMl0ptalDhnIhoq4pGnQFRwso0zz lz+kEzyVVrNOA3npRXvaWrJlPwh1sM6Q9MJuzaut5aoIjevrjbDLCdQfcEATP3vm15A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796291179; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=4v/c0Hjnt8S2Z5KHEpAaF/fMRQ186hXNQuL2ML9cCxE=; b=ZzUFQfmP3qPvhSbZUF3HPcbL1QoFa05xXhCg6dtkQfr3IMM6M58vldggz3ho/Cz9VPwa HVoU2PMFhqLCE5B14ORVjozvILVtYf+Xsq/VWq8I3q42XHPoFUuBQvZKwEJp1gIPBy18t sR5WeJCsGcBH9s2KIwVxvwuQ+quJ0FmLKaOvLFvS2llqDyOoan5jsFHUUMT+pRk/9zV01 SKDHNnXVCpuwpYhxxJy0T2EBpnig+tBJrIClUjlUPbbJyNeEbhfBcBFgs2GYoxdj+mQx+ KvYpiMxQzas/hGr/L6+6+CLqGLdL40OTXu1/hR3sCUC/QlNS4IU3j38BwbkglnMVqBw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="pMnPJC2/"; arc=none smtp.remote-ip=209.85.210.173 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30FBA606A322 for ; Thu, 3 Dec 2026 09:46:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 30FBA606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=pMnPJC2/ Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-8b271e573adso6166787b3a.2 for ; Thu, 03 Dec 2026 01:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796291178; x=1796895978; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=4v/c0Hjnt8S2Z5KHEpAaF/fMRQ186hXNQuL2ML9cCxE=; b=pMnPJC2/JA2StHleOtSTmXQmSML8c6vK+JVxzz9+klRyHE/LFz+3VggupqCB0gL6+X NSh0EtstDHYANEios5+JqzmQ+zvns+kkQq8iw4xrrhAo/6Cy+MAVQGIZwVUWTQF0hPFN +1vkl178urDhiiU/BhwWqvGbZkCzDu+dwL1pz7vYEMY8P3Vsv2jbHxoAgPKNAS7egzWy SSABvBT0eANt3KCMMFIs+jrwrbfCQh9SpNgZfkq4baUcHa6DjOagH4vS2mqzpqiseDha H/VaP0UCTyGd3BfjFrvt3xfwmSJL1eJFY5VtHr28VfSkT+GVdvVXSlqc2rhl4bzuIpZS 30PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796291178; x=1796895978; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=4v/c0Hjnt8S2Z5KHEpAaF/fMRQ186hXNQuL2ML9cCxE=; b=OvwKL1f3jkXoJTvtxlhXiV2DBoeMfQVAMgdVsvm4PqPSxpl43yIQax9yFQovZYwjj3 DuRGojFlAUr4xVEsU3eZ5ZuUywegCAbNRNEX4IkUFSZccMBunl+WEWtEXBusB0FvsvMi JiCJlDRsWUlGp/tqub6rNeTfkQ8xU3DyMs9K6hkxCdqO74JkzHD0HLbx1GwbmoM1Lrkr G5FyGvixpo3CeP39NhnW3CAgkf6JcjKyPu3vsMTY0tO/u8eIWkddDBnTSMWtQopWI622 YQ4m2gs6JW6+ETC9MqRE1CA0SgJobn7j450pp6LwIVVelpPeq9NcYGrvwNUmSVEz4Upz TMDA== X-Forwarded-Encrypted: i=1; AL+hErEYprqBMnOW080Ej7JXrvgUH1fID/2MvsXF3iAbRILikMCE57OXXsAP8XJ5NFwnr9hqcvL53EFbzqwUUg==@vger.kernel.org X-Gm-Message-State: APuU4Z+TVfAp36ca8nMpK04/+q/KmZ9ZekUEyyr5mZKEILAOJ6wrvBx3 iLqfOYSqo1YzbNDaeKnG8wyCU08/h8jhamgZPR8igI1pBPWaD9GVxMcb X-Gm-Gg: AZFdTZdKzqeKUdF/D7DZJ5oD5qy5pRQ/gcCFTOJ/UzYCGFbsl/cWQL/AsJjo32uQXeA qJwene3L9UxfR6eferFT0P5db4P+dMqQE8ch5U+dvGzykGt2oMfhIaE4MziJyMh6hge0fAGd34l WPyewCrTxEPhNdGyhUUQkDslCQOPDz0zdhliFFDPF5cGpTM7Ah6EYma3EUU3LimrWGYnqv6moPD TmMV23hAQJXf3x56kBM3mdWSJnIMFJAdAq5Zmu0nRyRrmb9YPmMjaFkJLtJA1wO+DQNfsAo2f8J Ti7ElakMtA0SPOTtC1vLIf3mnZ0xlcsG73HLempHNQRJQaQWpKY4BnePgY7K9Ftx4+GovFk+JFg LuSl4/if81eM0/MxLge0l1iDyTVPAyNUmjJb5bz2q21kW1m1vnAn24bbPEP2ZS3UCwvbsgLWcoJ 1ODcHZEQeDsDxrFWFXGeWTaB424205FkIEZncXUfpZlv2m1/pV4Xiskwcnru+IzyaZk/F5O2I7w F3h52pSAYJWTRxnYTjgvYgjoNIWkhgpEcxJp53iocFFnb/4m7js+yeoU/iIeTEwyHdpLhkNCbH5 7rmFa26EVj2MGVa7hTtQdY1M8KqPF0wzsB4BQlHJMBTqIy79V4uR7pidyQh2+p2N7R0WaIyH5km CQb4kZfHMFGZDHjiOx0TCSb3WVOD+D7tyIOAkznBmiyXI X-Received: by 2002:a05:6a20:c915:b0:3e2:e341:8a55 with SMTP id adf61e73a8af0-4014d4559c4mr47448525637.71.1796291178378; Thu, 03 Dec 2026 01:46:18 -0800 (PST) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cdebb45c972sm14875158a12.20.2026.12.03.01.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 01:46:18 -0800 (PST) From: phucduc.bui@gmail.com To: Mark Brown , Vijendar Mukunda , Venkata Prasad Potturu , Syed Saba Kareem Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Kees Cook , Kuninori Morimoto , wangdicheng , Chris Bainbridge , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH 1/5] ASoC: amd: ps: Use devm_pm_runtime_enable() Date: Thu, 3 Dec 2026 16:45:54 +0700 Message-ID: <20261203094558.26423-2-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261203094558.26423-1-phucduc.bui@gmail.com> References: <20261203094558.26423-1-phucduc.bui@gmail.com> X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc Use devm_pm_runtime_enable() in the PDM and SoundWire DMA drivers to automatically disable runtime PM when the devices are removed. This allows removing their remove callbacks. Signed-off-by: bui duc phuc --- sound/soc/amd/ps/ps-pdm-dma.c | 8 +------- sound/soc/amd/ps/ps-sdw-dma.c | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c index 359ca10b9ba4..7a894e8688ae 100644 --- a/sound/soc/amd/ps/ps-pdm-dma.c +++ b/sound/soc/amd/ps/ps-pdm-dma.c @@ -400,13 +400,8 @@ static int acp63_pdm_audio_probe(struct platform_device *pdev) pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_set_active(&pdev->dev); - pm_runtime_enable(&pdev->dev); - return 0; -} -static void acp63_pdm_audio_remove(struct platform_device *pdev) -{ - pm_runtime_disable(&pdev->dev); + return devm_pm_runtime_enable(&pdev->dev); } static int acp63_pdm_resume(struct device *dev) @@ -455,7 +450,6 @@ static const struct dev_pm_ops acp63_pdm_pm_ops = { static struct platform_driver acp63_pdm_dma_driver = { .probe = acp63_pdm_audio_probe, - .remove = acp63_pdm_audio_remove, .driver = { .name = "acp_ps_pdm_dma", .pm = pm_ptr(&acp63_pdm_pm_ops), diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c index 6c510e6d9a18..5bf712bcd8c5 100644 --- a/sound/soc/amd/ps/ps-sdw-dma.c +++ b/sound/soc/amd/ps/ps-sdw-dma.c @@ -683,13 +683,8 @@ static int acp63_sdw_platform_probe(struct platform_device *pdev) pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_set_active(&pdev->dev); - pm_runtime_enable(&pdev->dev); - return 0; -} -static void acp63_sdw_platform_remove(struct platform_device *pdev) -{ - pm_runtime_disable(&pdev->dev); + return devm_pm_runtime_enable(&pdev->dev); } static int acp63_restore_sdw_dma_config(struct sdw_dma_dev_data *sdw_data) @@ -795,7 +790,6 @@ static const struct dev_pm_ops acp63_pm_ops = { static struct platform_driver acp63_sdw_dma_driver = { .probe = acp63_sdw_platform_probe, - .remove = acp63_sdw_platform_remove, .driver = { .name = "amd_ps_sdw_dma", .pm = pm_ptr(&acp63_pm_ops), -- 2.43.0