From patchwork Thu Mar 13 17:40:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015592 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC1A0376F1 for ; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887723; cv=none; b=cSf3j3YfL57OY3cAlmRrqYVlFqeDFFRwykUgOhBgZXpKjOR90oseqXUcfZcFp3aIGj/1JWQta0c7TCmmpVFZ5jzMUW/qEINqcaDGjX4ICpIRloxtnkIMYT4g5vsYcI143RXggjmVCGa3aXYC20Rt2/peFXSnC+R15HMAMvXUJVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887723; c=relaxed/simple; bh=+k5QH6Nap3461rQaMRloD++W0SK6JbK89WiNjxeFXH4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iBddct8HvEcJZ2yESHg+hMCX8QZvheEU+2kQXlmqNtFYSBxjxCLOVX42yPx/0DzirfSxaT7Iaq48HQdv0xQICrsElhMJ7ZhF6VR1dI77h8UBlSYOK5Ow1I7DUyefnBQGHW7dV2mQedY78BYl2WjZZvvfpJMjHHC/uJ09Opn8aQA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=NKBe0VNv; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=rXYfM964; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=NKBe0VNv; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=rXYfM964; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="NKBe0VNv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="rXYfM964"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="NKBe0VNv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="rXYfM964" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AB2FC1F786; Thu, 13 Mar 2025 17:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v3R+N9RgWm4VODf1Dv5AfZniWTHnSUFH6NykevEMrTc=; b=NKBe0VNvM32KInhtigepFEb3nSOd7oai9fWovr0iYtTohXEx/u/zeRfQantOWNvV4TT4Jy XsWP1k/IOhrsadSBYO7z4iZB8LQfsxLjskoq/LBdzh1YmFWT2nhedpEFdgX75J8WjV5Gjn 0CYuTpDMNkIsUdIdya/SOibQtNbsv5Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v3R+N9RgWm4VODf1Dv5AfZniWTHnSUFH6NykevEMrTc=; b=rXYfM9643URW9H/I3PMFAgP3vRfhUC8nx8rDRe42zvyl/RJ5MV81GGkPRT3Lku5P41xY63 c3tGHXsQNJoqerBg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v3R+N9RgWm4VODf1Dv5AfZniWTHnSUFH6NykevEMrTc=; b=NKBe0VNvM32KInhtigepFEb3nSOd7oai9fWovr0iYtTohXEx/u/zeRfQantOWNvV4TT4Jy XsWP1k/IOhrsadSBYO7z4iZB8LQfsxLjskoq/LBdzh1YmFWT2nhedpEFdgX75J8WjV5Gjn 0CYuTpDMNkIsUdIdya/SOibQtNbsv5Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v3R+N9RgWm4VODf1Dv5AfZniWTHnSUFH6NykevEMrTc=; b=rXYfM9643URW9H/I3PMFAgP3vRfhUC8nx8rDRe42zvyl/RJ5MV81GGkPRT3Lku5P41xY63 c3tGHXsQNJoqerBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 86CFA139D2; Thu, 13 Mar 2025 17:41:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id +AOFH+EY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:53 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 01/89] ASoC: au1x: Convert to DEFINE_SIPMLE_DEV_PM_OPS() Date: Thu, 13 Mar 2025 18:40:06 +0100 Message-ID: <20250313174139.29942-2-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo] X-Spam-Flag: NO X-Spam-Level: Use the new DEFINE_SIPMLE_DEV_PM_OPS() macro instead of open code together with pm_ptr(), which allows us dropping CONFIG_PM ifdefs. Merely a cleanup, there should be no actual code change. Signed-off-by: Takashi Iwai --- sound/soc/au1x/i2sc.c | 17 +++-------------- sound/soc/au1x/psc-ac97.c | 17 +++-------------- sound/soc/au1x/psc-i2s.c | 17 +++-------------- 3 files changed, 9 insertions(+), 42 deletions(-) diff --git a/sound/soc/au1x/i2sc.c b/sound/soc/au1x/i2sc.c index 7d296f29dade..f94269814544 100644 --- a/sound/soc/au1x/i2sc.c +++ b/sound/soc/au1x/i2sc.c @@ -279,7 +279,6 @@ static void au1xi2s_drvremove(struct platform_device *pdev) WR(ctx, I2S_ENABLE, EN_D); /* clock off, disable */ } -#ifdef CONFIG_PM static int au1xi2s_drvsuspend(struct device *dev) { struct au1xpsc_audio_data *ctx = dev_get_drvdata(dev); @@ -294,23 +293,13 @@ static int au1xi2s_drvresume(struct device *dev) return 0; } -static const struct dev_pm_ops au1xi2sc_pmops = { - .suspend = au1xi2s_drvsuspend, - .resume = au1xi2s_drvresume, -}; - -#define AU1XI2SC_PMOPS (&au1xi2sc_pmops) - -#else - -#define AU1XI2SC_PMOPS NULL - -#endif +static DEFINE_SIPMLE_DEV_PM_OPS(au1xi2sc_pmops, au1xi2s_drvsuspend, + au1xi2s_drvresume); static struct platform_driver au1xi2s_driver = { .driver = { .name = "alchemy-i2sc", - .pm = AU1XI2SC_PMOPS, + .pm = pm_ptr(&au1xi2sc_pmops), }, .probe = au1xi2s_drvprobe, .remove = au1xi2s_drvremove, diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index 8a59a50978b9..94698e08a513 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c @@ -436,7 +436,6 @@ static void au1xpsc_ac97_drvremove(struct platform_device *pdev) au1xpsc_ac97_workdata = NULL; /* MDEV */ } -#ifdef CONFIG_PM static int au1xpsc_ac97_drvsuspend(struct device *dev) { struct au1xpsc_audio_data *wd = dev_get_drvdata(dev); @@ -467,23 +466,13 @@ static int au1xpsc_ac97_drvresume(struct device *dev) return 0; } -static const struct dev_pm_ops au1xpscac97_pmops = { - .suspend = au1xpsc_ac97_drvsuspend, - .resume = au1xpsc_ac97_drvresume, -}; - -#define AU1XPSCAC97_PMOPS &au1xpscac97_pmops - -#else - -#define AU1XPSCAC97_PMOPS NULL - -#endif +static DEFINE_SIMPLE_DEV_PM_OPS(au1xpscac97_pmops, au1xpsc_ac97_drvsuspend, + au1xpsc_ac97_drvresume); static struct platform_driver au1xpsc_ac97_driver = { .driver = { .name = "au1xpsc_ac97", - .pm = AU1XPSCAC97_PMOPS, + .pm = pm_ptr(&au1xpscac97_pmops), }, .probe = au1xpsc_ac97_drvprobe, .remove = au1xpsc_ac97_drvremove, diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index bee013555e7a..bf59105fcb7a 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c @@ -354,7 +354,6 @@ static void au1xpsc_i2s_drvremove(struct platform_device *pdev) wmb(); /* drain writebuffer */ } -#ifdef CONFIG_PM static int au1xpsc_i2s_drvsuspend(struct device *dev) { struct au1xpsc_audio_data *wd = dev_get_drvdata(dev); @@ -385,23 +384,13 @@ static int au1xpsc_i2s_drvresume(struct device *dev) return 0; } -static const struct dev_pm_ops au1xpsci2s_pmops = { - .suspend = au1xpsc_i2s_drvsuspend, - .resume = au1xpsc_i2s_drvresume, -}; - -#define AU1XPSCI2S_PMOPS &au1xpsci2s_pmops - -#else - -#define AU1XPSCI2S_PMOPS NULL - -#endif +static DEFINE_SIMPLE_DEV_PM_OPS(au1xpsci2s_pmops, au1xpsc_i2s_drvsuspend, + au1xpsc_i2s_drvresume); static struct platform_driver au1xpsc_i2s_driver = { .driver = { .name = "au1xpsc_i2s", - .pm = AU1XPSCI2S_PMOPS, + .pm = pm_ptr(&au1xpsci2s_pmops), }, .probe = au1xpsc_i2s_drvprobe, .remove = au1xpsc_i2s_drvremove, From patchwork Thu Mar 13 17:40:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015594 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E699A1714B7 for ; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887729; cv=none; b=gWlnmmZgZlglVBUI6S6U3+rR3T9AdhZ81fS45r6jKw8X5HqRTQDPco0VCd/XuGWIZm32PBZEZC0s0mh4+FbmK2HY28x8KZSFWFUTlLLaANGZbWHtUqz73qIF8uw2Ebtg0SUE7mNL0IyQ46lpeN+l3JyNICQ5jFxeo4wYi+Pwyqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887729; c=relaxed/simple; bh=xHYLq0uUYSafFxof2giB1VNBp15NqvTurmccQUZvNXw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FMiIddzA1+EEzf3XS2wAQbR9Len7gypXOaZ0DToo4E73XCwAiCvFH3GtbSWOdPxwpSnk3VLlnRp00yGJpZ7M8Qek/++kqziV4q/U7448EU5iQsjAHx5xwfwnyNn5QDzzfd1sfH9GfZ1xRDb638bQSgQZHA38xDka01RhmnFhJrY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=GALFUW5F; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=G3mx+o/l; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=GALFUW5F; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=G3mx+o/l; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="GALFUW5F"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="G3mx+o/l"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="GALFUW5F"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="G3mx+o/l" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D48C21F793; Thu, 13 Mar 2025 17:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGhOO0S7dTmw4fxIURICGRnYydAlgjiKvRqA9TpaFA4=; b=GALFUW5FWZgLdpUlVtQ7b1UVfCJYXc22q2y4OWy4WUxyWkOF7Hu9yagpApzgdOd5sXzeCt 23fPEx9yA8B45uf1N+DJW5ppSb7MqNONCT2JCuKalSqqKFJt08aHj1cxT7e1XMw/q0QFsd 4MFNTjxvRyCpRr8otY6nQtSpToMzTFE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGhOO0S7dTmw4fxIURICGRnYydAlgjiKvRqA9TpaFA4=; b=G3mx+o/lUHtCALaj5FlP4CvipyIrwMybIO84knFdZLatfcHiKb5WQLAF4zJK7SUSdC9pMn 2KCG9XYWqu9Rv5Ag== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGhOO0S7dTmw4fxIURICGRnYydAlgjiKvRqA9TpaFA4=; b=GALFUW5FWZgLdpUlVtQ7b1UVfCJYXc22q2y4OWy4WUxyWkOF7Hu9yagpApzgdOd5sXzeCt 23fPEx9yA8B45uf1N+DJW5ppSb7MqNONCT2JCuKalSqqKFJt08aHj1cxT7e1XMw/q0QFsd 4MFNTjxvRyCpRr8otY6nQtSpToMzTFE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887713; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MGhOO0S7dTmw4fxIURICGRnYydAlgjiKvRqA9TpaFA4=; b=G3mx+o/lUHtCALaj5FlP4CvipyIrwMybIO84knFdZLatfcHiKb5WQLAF4zJK7SUSdC9pMn 2KCG9XYWqu9Rv5Ag== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B313C137BA; Thu, 13 Mar 2025 17:41:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id CPpfKuEY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:53 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 02/89] ASoC: ak4375: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:07 +0100 Message-ID: <20250313174139.29942-3-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS () and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/ak4375.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ak4375.c b/sound/soc/codecs/ak4375.c index 3ee5a5c3c5fe..452559d8c97b 100644 --- a/sound/soc/codecs/ak4375.c +++ b/sound/soc/codecs/ak4375.c @@ -438,7 +438,7 @@ static int ak4375_power_on(struct ak4375_priv *ak4375) return 0; } -static int __maybe_unused ak4375_runtime_suspend(struct device *dev) +static int ak4375_runtime_suspend(struct device *dev) { struct ak4375_priv *ak4375 = dev_get_drvdata(dev); @@ -448,7 +448,7 @@ static int __maybe_unused ak4375_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused ak4375_runtime_resume(struct device *dev) +static int ak4375_runtime_resume(struct device *dev) { struct ak4375_priv *ak4375 = dev_get_drvdata(dev); int ret; @@ -490,9 +490,8 @@ static const struct ak4375_drvdata ak4375_drvdata = { }; static const struct dev_pm_ops ak4375_pm = { - SET_RUNTIME_PM_OPS(ak4375_runtime_suspend, ak4375_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(ak4375_runtime_suspend, ak4375_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static int ak4375_i2c_probe(struct i2c_client *i2c) @@ -594,7 +593,7 @@ MODULE_DEVICE_TABLE(of, ak4375_of_match); static struct i2c_driver ak4375_i2c_driver = { .driver = { .name = "ak4375", - .pm = &ak4375_pm, + .pm = pm_ptr(&ak4375_pm), .of_match_table = ak4375_of_match, }, .probe = ak4375_i2c_probe, From patchwork Thu Mar 13 17:40:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015596 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCF3E15747C for ; Thu, 13 Mar 2025 17:42:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887735; cv=none; b=mKNTQo/ly9vNScvY7IqaiGLhAIovTzR6pHb75JE/jr/NygXAkL+INHAUghebzs32/+aqub+HJeHqYGT1q1kGez/ooyC1rqXGZXTq1oXfuNsiAtHVIVrYWYHNE5Q28voSGQu8ipUy6JkYVqJQbwajmnWfnhZEM4boTeU9fOw+yY4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887735; c=relaxed/simple; bh=VfSuFyJ6K7gi77pSwt0hTVT7eSUI6+OEvYW03/nf1zQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TQAFGmmWnl35q4iJ75FfmnG7q7SPnNiqefkcFA/VAlG4b/5HoN8gp0UHoRpEf4VkVPzrnEn7b6vyTh9fSeWp73LvQQlyx+0QLS920XeP96tydpt6WPYTwXGh7OxnsmM2TTBgZZSE5CU0pcSJ9QvI1O2enXgQz7Woez76hVa95RY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Gf1DF+qj; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=hS2vlFrS; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Gf1DF+qj; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=hS2vlFrS; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Gf1DF+qj"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="hS2vlFrS"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Gf1DF+qj"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="hS2vlFrS" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0ACFB1F797; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yPnmMVyIWuOVFp3p9tE4+yORq6cKJozlvS/5RwwYHLA=; b=Gf1DF+qjIYzKowCZkNXeMsfugll88lu5PLKIAC9qi3c6p9ZlMqWKXDBWjifVatYk6qEVA9 4U5G4ommCaH2yGHDnYS/Q7eVVzs1BxUAjHXkyi4TGCUd0IvemgAqkm3FzOafoFDekRPrEG js3TV+/zaHkK1W6txboWM+nMsTJRUaE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yPnmMVyIWuOVFp3p9tE4+yORq6cKJozlvS/5RwwYHLA=; b=hS2vlFrSJ7K+VKuJVw+RSzszHD0+7y6LJ9hWzOXSIePaQlvIxbvIEKvuFM+vabXS1VYawp WJTd5wuEgM9X3XBw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Gf1DF+qj; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=hS2vlFrS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yPnmMVyIWuOVFp3p9tE4+yORq6cKJozlvS/5RwwYHLA=; b=Gf1DF+qjIYzKowCZkNXeMsfugll88lu5PLKIAC9qi3c6p9ZlMqWKXDBWjifVatYk6qEVA9 4U5G4ommCaH2yGHDnYS/Q7eVVzs1BxUAjHXkyi4TGCUd0IvemgAqkm3FzOafoFDekRPrEG js3TV+/zaHkK1W6txboWM+nMsTJRUaE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yPnmMVyIWuOVFp3p9tE4+yORq6cKJozlvS/5RwwYHLA=; b=hS2vlFrSJ7K+VKuJVw+RSzszHD0+7y6LJ9hWzOXSIePaQlvIxbvIEKvuFM+vabXS1VYawp WJTd5wuEgM9X3XBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DB889139D2; Thu, 13 Mar 2025 17:41:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id +JAuNOEY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:53 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 03/89] ASoC: ak4458: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:08 +0100 Message-ID: <20250313174139.29942-4-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 0ACFB1F797 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes and CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/ak4458.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index d472d9952628..5f3a68dfe7bd 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -639,8 +639,7 @@ static void ak4458_reset(struct ak4458_priv *ak4458, bool active) } } -#ifdef CONFIG_PM -static int __maybe_unused ak4458_runtime_suspend(struct device *dev) +static int ak4458_runtime_suspend(struct device *dev) { struct ak4458_priv *ak4458 = dev_get_drvdata(dev); @@ -656,7 +655,7 @@ static int __maybe_unused ak4458_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused ak4458_runtime_resume(struct device *dev) +static int ak4458_runtime_resume(struct device *dev) { struct ak4458_priv *ak4458 = dev_get_drvdata(dev); int ret; @@ -678,7 +677,6 @@ static int __maybe_unused ak4458_runtime_resume(struct device *dev) return regcache_sync(ak4458->regmap); } -#endif /* CONFIG_PM */ static const struct snd_soc_component_driver soc_codec_dev_ak4458 = { .controls = ak4458_snd_controls, @@ -727,9 +725,8 @@ static const struct ak4458_drvdata ak4497_drvdata = { }; static const struct dev_pm_ops ak4458_pm = { - SET_RUNTIME_PM_OPS(ak4458_runtime_suspend, ak4458_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(ak4458_runtime_suspend, ak4458_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static int ak4458_i2c_probe(struct i2c_client *i2c) @@ -805,7 +802,7 @@ MODULE_DEVICE_TABLE(of, ak4458_of_match); static struct i2c_driver ak4458_i2c_driver = { .driver = { .name = "ak4458", - .pm = &ak4458_pm, + .pm = pm_ptr(&ak4458_pm), .of_match_table = ak4458_of_match, }, .probe = ak4458_i2c_probe, From patchwork Thu Mar 13 17:40:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015591 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFC9A18A6A5 for ; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887717; cv=none; b=gTHSaOZnV11BfREdM/aAuhEqaDoRD6Iaqk2X01xxSdCFlPVNuf3PWmqb+rJ6jAWIn5G+Qp6uExb9GQacWue83v2WVtk9ET8zbVjVqKp3Jc+B8baWk11BbuF3Z40jmJh5KkC3cBr7ElVP+SZ02CNjEdbuSGVLDsMtJ4QdUriQy3Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887717; c=relaxed/simple; bh=EYR7jMHn3iMfj0jFQy2I5MLQ9l75WI9Lk+P/ZPSeZYI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HNvoDhEbUkP0ZJe01L/Dryz2VWMiNS9azK0rG7isAGjBD24P4HG+itkfFLc0hLP0tBablybWHTX/lu9d2fOpgSeo2V5vgz0PlkcIWoILzgBXNDjWBsVNZNoaDbY+9J4fvjlTTdlLGh9tKs/rSsi+8y2W8QsorSZYzCCpfHM7qu4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=W8jBkzC3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eTFDL7nP; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=W8jBkzC3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eTFDL7nP; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="W8jBkzC3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eTFDL7nP"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="W8jBkzC3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eTFDL7nP" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 32BE121196; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cetRBQD16UqIMYvjndP42T4m+ezJjD7MZpHeR3tWrRs=; b=W8jBkzC3unW+rerXjg6xJayu2dQ//b+9gr5ORuAioduPcMSvNR9LROvZuBJlSRy6lVCtOr gkN5ujb7h2yyjXrqdag1Mh5tmNZU39OKY0/HxAq14xm8QSkoJZy8O3dfsSLbiG4/aF1vDD X6xsgnUSwDZaRwz5yY+rnD0g9AD89yE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cetRBQD16UqIMYvjndP42T4m+ezJjD7MZpHeR3tWrRs=; b=eTFDL7nPZmUqehuk3WnPIwbQ5mI9qly3DHPTSsuvQa5H5ODFY/ysNEjis/GJk5yun11sI5 2CLcoy6JythvfjDQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cetRBQD16UqIMYvjndP42T4m+ezJjD7MZpHeR3tWrRs=; b=W8jBkzC3unW+rerXjg6xJayu2dQ//b+9gr5ORuAioduPcMSvNR9LROvZuBJlSRy6lVCtOr gkN5ujb7h2yyjXrqdag1Mh5tmNZU39OKY0/HxAq14xm8QSkoJZy8O3dfsSLbiG4/aF1vDD X6xsgnUSwDZaRwz5yY+rnD0g9AD89yE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cetRBQD16UqIMYvjndP42T4m+ezJjD7MZpHeR3tWrRs=; b=eTFDL7nPZmUqehuk3WnPIwbQ5mI9qly3DHPTSsuvQa5H5ODFY/ysNEjis/GJk5yun11sI5 2CLcoy6JythvfjDQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 12249137BA; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id yDAYA+IY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:54 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 04/89] ASoC: ak5558: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:09 +0100 Message-ID: <20250313174139.29942-5-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/ak5558.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/ak5558.c b/sound/soc/codecs/ak5558.c index 6c767609f95d..683f3e472f50 100644 --- a/sound/soc/codecs/ak5558.c +++ b/sound/soc/codecs/ak5558.c @@ -342,7 +342,7 @@ static void ak5558_remove(struct snd_soc_component *component) ak5558_reset(ak5558, true); } -static int __maybe_unused ak5558_runtime_suspend(struct device *dev) +static int ak5558_runtime_suspend(struct device *dev) { struct ak5558_priv *ak5558 = dev_get_drvdata(dev); @@ -354,7 +354,7 @@ static int __maybe_unused ak5558_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused ak5558_runtime_resume(struct device *dev) +static int ak5558_runtime_resume(struct device *dev) { struct ak5558_priv *ak5558 = dev_get_drvdata(dev); int ret; @@ -376,9 +376,8 @@ static int __maybe_unused ak5558_runtime_resume(struct device *dev) } static const struct dev_pm_ops ak5558_pm = { - SET_RUNTIME_PM_OPS(ak5558_runtime_suspend, ak5558_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(ak5558_runtime_suspend, ak5558_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static const struct snd_soc_component_driver soc_codec_dev_ak5558 = { @@ -495,7 +494,7 @@ static struct i2c_driver ak5558_i2c_driver = { .driver = { .name = "ak5558", .of_match_table = of_match_ptr(ak5558_i2c_dt_ids), - .pm = &ak5558_pm, + .pm = pm_ptr(&ak5558_pm), }, .probe = ak5558_i2c_probe, .remove = ak5558_i2c_remove, From patchwork Thu Mar 13 17:40:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015598 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 132BE1940A1 for ; Thu, 13 Mar 2025 17:42:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887741; cv=none; b=fFuFaBd5VUfEZrZsPQmh9I0dJIL20JKAQp0+eVXr5ZGh2tFe4rjoQQF/X/maHCGwxrBFpj+x37yraBiHQBuYcHenRIZaxJCaf7VUBrUx0dWrmAiuY3IJYXmVaCGbRALRlJoo5I1RuL53bNE57+4N2jQqyS6DAC/dxmp0Eb/Kc/w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887741; c=relaxed/simple; bh=36GiCXDoAnFyQLdloqKvLJnee8MQ8x5pgVttv3uohZU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=spCG2w/Zv5UBbNRqJJK3xzWpRKIDj3WvVWbfsmlN6ltes7bDeRrAfWsRnryh8Kt2jWe/WdfFYTtPZlINprgSZifBexgIbKwpIHUuhcozjIAcG1iPsdWiTwqUrnQYbs0wUQn/Wf9cL7nrLEhquIFWk/FmCQn53drbLqrIVV+4seE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=VP5swRlv; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Lp7CfvX+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=VP5swRlv; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Lp7CfvX+; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="VP5swRlv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Lp7CfvX+"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="VP5swRlv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Lp7CfvX+" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5FD0B1F798; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZkKv3fij44mh8cOOULMWNMGDyn7I6sUPsckU4ns0zO4=; b=VP5swRlvY25NjbD4doZ+Xd+X1yti/6vm76jU2dHyiXCN/x457YS4MGtAktUm79Kh6tXzXT deVEdbxixjlzxvsn/N8H1dKQSD/XaiNOw1lwZpjdFi8Gmtim7uRGephmgw9KaAq98VP6MJ 0tfUOavn3E8x0WAP1jV6tjKMI+Jp0mI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZkKv3fij44mh8cOOULMWNMGDyn7I6sUPsckU4ns0zO4=; b=Lp7CfvX+MhiPv+jL/VZJ8DdNjQLVeF1BBRL38o1X06sFRprUocQhf40gs3Enrz5h848SFW JFS8CXkyGaGWYcDw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZkKv3fij44mh8cOOULMWNMGDyn7I6sUPsckU4ns0zO4=; b=VP5swRlvY25NjbD4doZ+Xd+X1yti/6vm76jU2dHyiXCN/x457YS4MGtAktUm79Kh6tXzXT deVEdbxixjlzxvsn/N8H1dKQSD/XaiNOw1lwZpjdFi8Gmtim7uRGephmgw9KaAq98VP6MJ 0tfUOavn3E8x0WAP1jV6tjKMI+Jp0mI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZkKv3fij44mh8cOOULMWNMGDyn7I6sUPsckU4ns0zO4=; b=Lp7CfvX+MhiPv+jL/VZJ8DdNjQLVeF1BBRL38o1X06sFRprUocQhf40gs3Enrz5h848SFW JFS8CXkyGaGWYcDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 387F5139D2; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6MR9DOIY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:54 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 05/89] ASoC: cs35l32: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:10 +0100 Message-ID: <20250313174139.29942-6-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs35l32.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/cs35l32.c b/sound/soc/codecs/cs35l32.c index 6d78fa953c89..0bb4bdb3deec 100644 --- a/sound/soc/codecs/cs35l32.c +++ b/sound/soc/codecs/cs35l32.c @@ -504,7 +504,6 @@ static void cs35l32_i2c_remove(struct i2c_client *i2c_client) gpiod_set_value_cansleep(cs35l32->reset_gpio, 0); } -#ifdef CONFIG_PM static int cs35l32_runtime_suspend(struct device *dev) { struct cs35l32_private *cs35l32 = dev_get_drvdata(dev); @@ -543,11 +542,9 @@ static int cs35l32_runtime_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops cs35l32_runtime_pm = { - SET_RUNTIME_PM_OPS(cs35l32_runtime_suspend, cs35l32_runtime_resume, - NULL) + RUNTIME_PM_OPS(cs35l32_runtime_suspend, cs35l32_runtime_resume, NULL) }; static const struct of_device_id cs35l32_of_match[] = { @@ -567,7 +564,7 @@ MODULE_DEVICE_TABLE(i2c, cs35l32_id); static struct i2c_driver cs35l32_i2c_driver = { .driver = { .name = "cs35l32", - .pm = &cs35l32_runtime_pm, + .pm = pm_ptr(&cs35l32_runtime_pm), .of_match_table = cs35l32_of_match, }, .id_table = cs35l32_id, From patchwork Thu Mar 13 17:40:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015600 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F5831DD9AB for ; Thu, 13 Mar 2025 17:42:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887747; cv=none; b=t1LwDw5IFNbzkOHA/oCN19bIJKUOfTsp0V0kFLfYVyCgv3jl+5T3fneiHT2jLWK5CyhdDrZtp0D7dGtGQ2JFhEFMBD8OaYusuYevgNtxSIjJJYVYtyoK9DDfS4g8KUsWO+EJ5DSNJhaxmZMy1IVqTzXzSZEXAnjgStXAII8f97A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887747; c=relaxed/simple; bh=xaed3NjE0w7Pn7eurcj+mj0LOBW/0OpwZU94KAvvqMQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nGR77c6VYm3EIPAzgO+8AyZYdzOudlu/ZuZMv8m6MvlsXQwEsXd2mk2RW+ujlazbm+rWqHHytoP/gTeL6qKviYCDJk8vJStEBp0/eONQ/mUIVCG6kMOk/cb45iNNhm40fXzkaCIKSe9ZO4hM6gBZzUPOyzB51ponywxLfEA2evU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RuQJosPq; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=I/UFCirq; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RuQJosPq; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=I/UFCirq; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RuQJosPq"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="I/UFCirq"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RuQJosPq"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="I/UFCirq" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 914DF1F799; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0bnGaqDMKFe802MsjJfEwwiDkQM9DPaIc5TIKvCJKLI=; b=RuQJosPqJa/hvVkc6y7Cs3iqRog54AS4yJtCj1uEL1xAQJztgu+RJJZWfE4HA+DD32EjdN icluHSOgo49yqz+rVuFxjStJ57znG/gzPwAcjFdQOX79oDTbOHVd0C0/3aBZiXAWUCgyg7 syois9pA37EbN1xAihmqCihav7UuL/w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0bnGaqDMKFe802MsjJfEwwiDkQM9DPaIc5TIKvCJKLI=; b=I/UFCirqk23+2t58ig1E0/esYijPzm9SnqVz6tHsZpIgqk+28aOlnHIAOyTc00LNaamj4v t2ycJ5QOcLdA4aDg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=RuQJosPq; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="I/UFCirq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0bnGaqDMKFe802MsjJfEwwiDkQM9DPaIc5TIKvCJKLI=; b=RuQJosPqJa/hvVkc6y7Cs3iqRog54AS4yJtCj1uEL1xAQJztgu+RJJZWfE4HA+DD32EjdN icluHSOgo49yqz+rVuFxjStJ57znG/gzPwAcjFdQOX79oDTbOHVd0C0/3aBZiXAWUCgyg7 syois9pA37EbN1xAihmqCihav7UuL/w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0bnGaqDMKFe802MsjJfEwwiDkQM9DPaIc5TIKvCJKLI=; b=I/UFCirqk23+2t58ig1E0/esYijPzm9SnqVz6tHsZpIgqk+28aOlnHIAOyTc00LNaamj4v t2ycJ5QOcLdA4aDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 66C08137BA; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OLHHF+IY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:54 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 06/89] ASoC: cs35l33: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:11 +0100 Message-ID: <20250313174139.29942-7-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 914DF1F799 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs35l33.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c index 02a420659a33..c927592f90c9 100644 --- a/sound/soc/codecs/cs35l33.c +++ b/sound/soc/codecs/cs35l33.c @@ -853,7 +853,7 @@ static const struct regmap_config cs35l33_regmap = { .use_single_write = true, }; -static int __maybe_unused cs35l33_runtime_resume(struct device *dev) +static int cs35l33_runtime_resume(struct device *dev) { struct cs35l33_private *cs35l33 = dev_get_drvdata(dev); int ret; @@ -891,7 +891,7 @@ static int __maybe_unused cs35l33_runtime_resume(struct device *dev) return ret; } -static int __maybe_unused cs35l33_runtime_suspend(struct device *dev) +static int cs35l33_runtime_suspend(struct device *dev) { struct cs35l33_private *cs35l33 = dev_get_drvdata(dev); @@ -909,9 +909,7 @@ static int __maybe_unused cs35l33_runtime_suspend(struct device *dev) } static const struct dev_pm_ops cs35l33_pm_ops = { - SET_RUNTIME_PM_OPS(cs35l33_runtime_suspend, - cs35l33_runtime_resume, - NULL) + RUNTIME_PM_OPS(cs35l33_runtime_suspend, cs35l33_runtime_resume, NULL) }; static int cs35l33_get_hg_data(const struct device_node *np, @@ -1273,7 +1271,7 @@ MODULE_DEVICE_TABLE(i2c, cs35l33_id); static struct i2c_driver cs35l33_i2c_driver = { .driver = { .name = "cs35l33", - .pm = &cs35l33_pm_ops, + .pm = pm_ptr(&cs35l33_pm_ops), .of_match_table = cs35l33_of_match, }, From patchwork Thu Mar 13 17:40:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015602 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5ED93194080 for ; Thu, 13 Mar 2025 17:42:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887753; cv=none; b=n/PbwSsb7z5UP2ht/vE/ZrKT/86wkYpJHhLPe9U0OpvK5LQJLJoOhQWcK6emB/VEm7P1sBI45MuVJRWBTRz7DPy3E5enfoQWPLVH43NKPM0+TcQdJUWMbS1bQBx/83nMCfaresqd/iATSZpSo/rr9DehMpK42iLEMzuLAaZqAFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887753; c=relaxed/simple; bh=WF84afmpOcrQpmFykMwCWGe3MFpgYRJInREtE3hj7w0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UeR6Bq3Wy3y9u3n2fM4SFJ8mXtExncrKC+b+70yCx+BM3CCL8pPWIHQEKMVL2dUQLDaTjrvmhMofsZdFLtPctaWCw1xOb3xySpN8rWItKzqR5cIQoe8UXPXBPYZS+m0a9OO31SsBzrhG36TYirZAVud3JeEPjrj6D6R5sYPjyAE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Wyz0d7IM; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=hrcSV/Oo; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Wyz0d7IM; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=hrcSV/Oo; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Wyz0d7IM"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="hrcSV/Oo"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Wyz0d7IM"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="hrcSV/Oo" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BDCB11F79A; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cHp6mE+ISOMXCIWy8A29+LC7JaVIMCe88LZFn5NkzQo=; b=Wyz0d7IMaZwRTcHMtfoW5VWPEwyxX9UbZPwEwRkbccSgYu4ixT04q8AIMBx198wyvamcKv Yn/aBV1JQMzYVgonvUETbUlDSCuc6sO7IQM9KP9jXd3ztABPtOsh2nYO5LRzlVQUmqGOs2 eMGlGNL6bErEo6dZoXS1G8ixIidKR8U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cHp6mE+ISOMXCIWy8A29+LC7JaVIMCe88LZFn5NkzQo=; b=hrcSV/Oo/3BCurhMR+ofemAkLqjmr44XxuVoQkFWrIp4tzl1X1Vd3GZKAvZ9VYzazs2VYH 5B+CnNoip2BOgIBw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Wyz0d7IM; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="hrcSV/Oo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cHp6mE+ISOMXCIWy8A29+LC7JaVIMCe88LZFn5NkzQo=; b=Wyz0d7IMaZwRTcHMtfoW5VWPEwyxX9UbZPwEwRkbccSgYu4ixT04q8AIMBx198wyvamcKv Yn/aBV1JQMzYVgonvUETbUlDSCuc6sO7IQM9KP9jXd3ztABPtOsh2nYO5LRzlVQUmqGOs2 eMGlGNL6bErEo6dZoXS1G8ixIidKR8U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cHp6mE+ISOMXCIWy8A29+LC7JaVIMCe88LZFn5NkzQo=; b=hrcSV/Oo/3BCurhMR+ofemAkLqjmr44XxuVoQkFWrIp4tzl1X1Vd3GZKAvZ9VYzazs2VYH 5B+CnNoip2BOgIBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 945E413A24; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id IBXzIuIY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:54 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 07/89] ASoC: cs35l34: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:12 +0100 Message-ID: <20250313174139.29942-8-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: BDCB11F79A X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs35l34.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c index 6d098bfd38f6..a5a8075598ff 100644 --- a/sound/soc/codecs/cs35l34.c +++ b/sound/soc/codecs/cs35l34.c @@ -1116,7 +1116,7 @@ static void cs35l34_i2c_remove(struct i2c_client *client) cs35l34->core_supplies); } -static int __maybe_unused cs35l34_runtime_resume(struct device *dev) +static int cs35l34_runtime_resume(struct device *dev) { struct cs35l34_private *cs35l34 = dev_get_drvdata(dev); int ret; @@ -1149,7 +1149,7 @@ static int __maybe_unused cs35l34_runtime_resume(struct device *dev) return ret; } -static int __maybe_unused cs35l34_runtime_suspend(struct device *dev) +static int cs35l34_runtime_suspend(struct device *dev) { struct cs35l34_private *cs35l34 = dev_get_drvdata(dev); @@ -1165,9 +1165,7 @@ static int __maybe_unused cs35l34_runtime_suspend(struct device *dev) } static const struct dev_pm_ops cs35l34_pm_ops = { - SET_RUNTIME_PM_OPS(cs35l34_runtime_suspend, - cs35l34_runtime_resume, - NULL) + RUNTIME_PM_OPS(cs35l34_runtime_suspend, cs35l34_runtime_resume, NULL) }; static const struct of_device_id cs35l34_of_match[] = { @@ -1185,7 +1183,7 @@ MODULE_DEVICE_TABLE(i2c, cs35l34_id); static struct i2c_driver cs35l34_i2c_driver = { .driver = { .name = "cs35l34", - .pm = &cs35l34_pm_ops, + .pm = pm_ptr(&cs35l34_pm_ops), .of_match_table = cs35l34_of_match, }, From patchwork Thu Mar 13 17:40:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015593 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03395155CBD for ; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887723; cv=none; b=KHl+kf/nLZNVdIsv0WjJAReFstNCNopiP4ZljjHjpC4JZBZodnR8JYpdxYR/cFlhhKlFv3kV4Y3MKwDmApAueuK9HpdFDt+58jDylr0rGq087LDCQZ0rzGX2/2JW3gWIA/Q9I0VPj8hBXA8hP+SMd6FbLl0UFZ0leSJfl6oEesU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887723; c=relaxed/simple; bh=oOIXNfFskGk0v/7ATU5NWm3MAJXXGajaLztAGpYrOd0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Oieq3hVQD7EtgheETAYgvawCqlBtOr1IO69PP8QUFodBEHGP1rzQF3JCJ0pzDFDaXZgGTmkvq8QNDxQgY7O7HWvob7JnfG8O4LNummD8anOqpd7fDaLcCforbYaoEJ4CFQmPc5TjhaL8GW8FvJ9ibuEo8240rCNuk1NHkuTz7Uc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=p+T7sQS6; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2S3b5dLm; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=xEIS/qAC; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=7Fazghml; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="p+T7sQS6"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2S3b5dLm"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="xEIS/qAC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="7Fazghml" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E90D42119A; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WyIjlVJPYT9lTl4DRjz7hjeSLxqWKmbntpOQ2T5OBRk=; b=p+T7sQS6v0/ozrDcucoNAmwlkNszeLVlBS1fXjH1trYcbb1PZGJuW19vINphrG2OOjZEKv QNB/Gts/gGzFyG1NfOQRySVP6zpT45ZSbpji/1pwzRjHPr+IGYLaZQqTpEaEIxZqv9Bvrc OVSl6RxuAvAaeoVNhejMifD3PCa0gcA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WyIjlVJPYT9lTl4DRjz7hjeSLxqWKmbntpOQ2T5OBRk=; b=2S3b5dLm1UKUT1IQYxTQsx/8Db2srmCC6H0pYfmh/bb4efxVozKlfZL8H6QwM4bWppvZRx /CuwS/Xa4S0bYsBQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WyIjlVJPYT9lTl4DRjz7hjeSLxqWKmbntpOQ2T5OBRk=; b=xEIS/qACs9KG+2wZQz6J4/7zKevzfYDzgL+6fuBlcmBFWpT8UIFeWB1x7gN/SQKZ2pj/cA FCuV56z7NtFzUzpoJdcgg3E9N2PnDgWLjRNunog+6cUmkIHP6FH7631hnZiS8H15HDV3Dc 9PTWQdEudft9SX1YdqDusWX4Ryq6NZg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887714; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WyIjlVJPYT9lTl4DRjz7hjeSLxqWKmbntpOQ2T5OBRk=; b=7FazghmlG/7FJ43TEI4wKy1RrPkrvRnjz6wks/PNxAFEAR45S90plNGo7D0gy+RNs72pEC O3v7GbkDJi6qBWDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C37A4137BA; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QPtoLuIY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:54 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 08/89] ASoC: cs35l56: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:13 +0100 Message-ID: <20250313174139.29942-9-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. Merely a cleanup, there should be no actual code change. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs35l56-sdw.c | 12 ++++++------ sound/soc/codecs/cs35l56.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c index 3f91cb3f9ae7..e7bb05775ecd 100644 --- a/sound/soc/codecs/cs35l56-sdw.c +++ b/sound/soc/codecs/cs35l56-sdw.c @@ -413,7 +413,7 @@ static const struct sdw_slave_ops cs35l56_sdw_ops = { #endif }; -static int __maybe_unused cs35l56_sdw_handle_unattach(struct cs35l56_private *cs35l56) +static int cs35l56_sdw_handle_unattach(struct cs35l56_private *cs35l56) { struct sdw_slave *peripheral = cs35l56->sdw_peripheral; @@ -437,7 +437,7 @@ static int __maybe_unused cs35l56_sdw_handle_unattach(struct cs35l56_private *cs return 0; } -static int __maybe_unused cs35l56_sdw_runtime_suspend(struct device *dev) +static int cs35l56_sdw_runtime_suspend(struct device *dev) { struct cs35l56_private *cs35l56 = dev_get_drvdata(dev); @@ -447,7 +447,7 @@ static int __maybe_unused cs35l56_sdw_runtime_suspend(struct device *dev) return cs35l56_runtime_suspend_common(&cs35l56->base); } -static int __maybe_unused cs35l56_sdw_runtime_resume(struct device *dev) +static int cs35l56_sdw_runtime_resume(struct device *dev) { struct cs35l56_private *cs35l56 = dev_get_drvdata(dev); int ret; @@ -472,7 +472,7 @@ static int __maybe_unused cs35l56_sdw_runtime_resume(struct device *dev) return 0; } -static int __maybe_unused cs35l56_sdw_system_suspend(struct device *dev) +static int cs35l56_sdw_system_suspend(struct device *dev) { struct cs35l56_private *cs35l56 = dev_get_drvdata(dev); @@ -495,7 +495,7 @@ static int __maybe_unused cs35l56_sdw_system_suspend(struct device *dev) return cs35l56_system_suspend(dev); } -static int __maybe_unused cs35l56_sdw_system_resume(struct device *dev) +static int cs35l56_sdw_system_resume(struct device *dev) { struct cs35l56_private *cs35l56 = dev_get_drvdata(dev); @@ -555,7 +555,7 @@ static int cs35l56_sdw_remove(struct sdw_slave *peripheral) } static const struct dev_pm_ops cs35l56_sdw_pm = { - SET_RUNTIME_PM_OPS(cs35l56_sdw_runtime_suspend, cs35l56_sdw_runtime_resume, NULL) + RUNTIME_PM_OPS(cs35l56_sdw_runtime_suspend, cs35l56_sdw_runtime_resume, NULL) SYSTEM_SLEEP_PM_OPS(cs35l56_sdw_system_suspend, cs35l56_sdw_system_resume) LATE_SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend_late, cs35l56_system_resume_early) /* NOIRQ stage not needed, SoundWire doesn't use a hard IRQ */ diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index 735a1e487c6f..8742bdce7a92 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -939,14 +939,14 @@ static const struct snd_soc_component_driver soc_component_dev_cs35l56 = { .suspend_bias_off = 1, /* see cs35l56_system_resume() */ }; -static int __maybe_unused cs35l56_runtime_suspend_i2c_spi(struct device *dev) +static int cs35l56_runtime_suspend_i2c_spi(struct device *dev) { struct cs35l56_private *cs35l56 = dev_get_drvdata(dev); return cs35l56_runtime_suspend_common(&cs35l56->base); } -static int __maybe_unused cs35l56_runtime_resume_i2c_spi(struct device *dev) +static int cs35l56_runtime_resume_i2c_spi(struct device *dev) { struct cs35l56_private *cs35l56 = dev_get_drvdata(dev); @@ -1457,7 +1457,7 @@ EXPORT_SYMBOL_NS_GPL(cs35l56_remove, "SND_SOC_CS35L56_CORE"); #if IS_ENABLED(CONFIG_SND_SOC_CS35L56_I2C) || IS_ENABLED(CONFIG_SND_SOC_CS35L56_SPI) EXPORT_NS_GPL_DEV_PM_OPS(cs35l56_pm_ops_i2c_spi, SND_SOC_CS35L56_CORE) = { - SET_RUNTIME_PM_OPS(cs35l56_runtime_suspend_i2c_spi, cs35l56_runtime_resume_i2c_spi, NULL) + RUNTIME_PM_OPS(cs35l56_runtime_suspend_i2c_spi, cs35l56_runtime_resume_i2c_spi, NULL) SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend, cs35l56_system_resume) LATE_SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend_late, cs35l56_system_resume_early) NOIRQ_SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend_no_irq, cs35l56_system_resume_no_irq) From patchwork Thu Mar 13 17:40:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015604 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D7C4199934 for ; Thu, 13 Mar 2025 17:42:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887760; cv=none; b=HK5d/Hke7yepSsZpgJ9WGOEB+0jK35/NmPhq1wgskaHQnJmEVa9sM3XDdGiHaTpv1VfO6oERxnWM2XOPGm5xM72P5J6cD0S8Pwu80c+e0laKLeSWaYH+uKJx37wKikGJEGDCwvKsYTHlKpJ2aRSx2atArRtwMPwDoSVW1ZjjGus= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887760; c=relaxed/simple; bh=g5aVvXsNESzWDXnQWTEcqSbiYGR0vdVB+hJlvaFK0o0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qHZ3PasbPceHJc7BC2Jfq1ULKQueuePSwnBdoe++l3ERZu+GILKm6l/FqjiZ8aEd1nrg7xp73v5M/EICyIGUc2TxCrg+Ttxb0wnBGHAogFAZNW3xsdxqzs7fQRVBLEfXiOkH7T9Hjme1XaiRV+W5VJCmm5+6QA27ksDyYg4UQcQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=E7aoNK7d; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=aSyLtQ+c; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=E7aoNK7d; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=aSyLtQ+c; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="E7aoNK7d"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="aSyLtQ+c"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="E7aoNK7d"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="aSyLtQ+c" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2DCA91F79B; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/nuAi7X2ybeXrtzm1kmPSEV26//B+I2i1mv12nCn+cc=; b=E7aoNK7d2xOt0CrLqPMKnM2TSm0vO7KwYhyDvYim9euMLGTi7nwDlS4aBb0uiZ6NFZy32c zZdYHuYuN9UUIcnBJ2LuQk9l8tnIwXfh1W4Esi78/J3Oud339eGVdcMZl8LJA7Vcduxf15 DFeih5WVqyA/Uj9Za5fIwD+uDM5bMHA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/nuAi7X2ybeXrtzm1kmPSEV26//B+I2i1mv12nCn+cc=; b=aSyLtQ+cDHpZKwNoC2vB6jX//glbjvRlTj3AtCvm37eyXFK06E4/PW7FrKcYQrMRf4egdc KP7S5Rd929PSPDBQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=E7aoNK7d; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=aSyLtQ+c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/nuAi7X2ybeXrtzm1kmPSEV26//B+I2i1mv12nCn+cc=; b=E7aoNK7d2xOt0CrLqPMKnM2TSm0vO7KwYhyDvYim9euMLGTi7nwDlS4aBb0uiZ6NFZy32c zZdYHuYuN9UUIcnBJ2LuQk9l8tnIwXfh1W4Esi78/J3Oud339eGVdcMZl8LJA7Vcduxf15 DFeih5WVqyA/Uj9Za5fIwD+uDM5bMHA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/nuAi7X2ybeXrtzm1kmPSEV26//B+I2i1mv12nCn+cc=; b=aSyLtQ+cDHpZKwNoC2vB6jX//glbjvRlTj3AtCvm37eyXFK06E4/PW7FrKcYQrMRf4egdc KP7S5Rd929PSPDBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id F0030139D2; Thu, 13 Mar 2025 17:41:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WHM8OeIY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:54 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 09/89] ASoC: cs4234: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:14 +0100 Message-ID: <20250313174139.29942-10-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 2DCA91F79B X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs4234.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/cs4234.c b/sound/soc/codecs/cs4234.c index df160db5bbb5..dda7f5b4f2fb 100644 --- a/sound/soc/codecs/cs4234.c +++ b/sound/soc/codecs/cs4234.c @@ -860,7 +860,7 @@ static void cs4234_i2c_remove(struct i2c_client *i2c_client) cs4234_shutdown(cs4234); } -static int __maybe_unused cs4234_runtime_resume(struct device *dev) +static int cs4234_runtime_resume(struct device *dev) { struct cs4234 *cs4234 = dev_get_drvdata(dev); int ret; @@ -881,7 +881,7 @@ static int __maybe_unused cs4234_runtime_resume(struct device *dev) return 0; } -static int __maybe_unused cs4234_runtime_suspend(struct device *dev) +static int cs4234_runtime_suspend(struct device *dev) { struct cs4234 *cs4234 = dev_get_drvdata(dev); @@ -891,7 +891,7 @@ static int __maybe_unused cs4234_runtime_suspend(struct device *dev) } static const struct dev_pm_ops cs4234_pm = { - SET_RUNTIME_PM_OPS(cs4234_runtime_suspend, cs4234_runtime_resume, NULL) + RUNTIME_PM_OPS(cs4234_runtime_suspend, cs4234_runtime_resume, NULL) }; static const struct of_device_id cs4234_of_match[] = { @@ -903,7 +903,7 @@ MODULE_DEVICE_TABLE(of, cs4234_of_match); static struct i2c_driver cs4234_i2c_driver = { .driver = { .name = "cs4234", - .pm = &cs4234_pm, + .pm = pm_ptr(&cs4234_pm), .of_match_table = cs4234_of_match, }, .probe = cs4234_i2c_probe, From patchwork Thu Mar 13 17:40:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015595 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0691155CBD for ; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887729; cv=none; b=skYDIgGl5gyjomMU7vOK9HHMmq+OUeHvFOZOVrkXggMc3UEhctnhQkIfsgut+jYtx6PpghQM/uYfS5Soq5IyPVKdNQCf5se2dTjLqlYY90cUrW1eNrlGhpFVll+jFOjx6E2x8+YoZbZyePUIwNAcAtQ9+OjZDGVOqh0nMej1PvY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887729; c=relaxed/simple; bh=x+q7QFesmYk8JY0Ho74Bc266nED+MDNYbSvIqJnh8IE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OmGwrQ9aBrBFyriiHoVyxE3y7+QVoCBNq3hDGz8T8z7dCa/gl8QdQtJJAjt6amL9M5VofgZQEY869eGm9KpRDyp/KynjmTIT37VUk5KULWYSyGww9SFssYL1PiYEwZZu9Nq6nNQURDN0Y4tCtU0GZLh4En+6F8E2MaXmnjQ5Vmo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=EilILJ8B; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Af0Db1DJ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=EilILJ8B; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Af0Db1DJ; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EilILJ8B"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Af0Db1DJ"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EilILJ8B"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Af0Db1DJ" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4FB19211B8; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FXnAMmDhseinqmOlgpPDC0ZLCDpX86ndHiGqskZjc9U=; b=EilILJ8BdH4AjXRYwdk3lj1SJ3+T2DDDHDn9qqMPSAro/I6CDDjEPSUHipZ2tTlLH51SBP 5IBTch/trotcksWVHzVDcFTWvA7sNV6JBy7LNjDRyNHLPxiHXly47sMmoqghwPUSoiVF1G qS4YnBllDp88qbVl3huxrSt8k9NnefI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FXnAMmDhseinqmOlgpPDC0ZLCDpX86ndHiGqskZjc9U=; b=Af0Db1DJuw9Wee1wmmF4ag80hHoTBI8Wlb5D9aiukXpuSRY4BYE7wpy0jKQWXTzIDcKMC+ XlHasrrBaZrg+AAw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=EilILJ8B; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Af0Db1DJ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FXnAMmDhseinqmOlgpPDC0ZLCDpX86ndHiGqskZjc9U=; b=EilILJ8BdH4AjXRYwdk3lj1SJ3+T2DDDHDn9qqMPSAro/I6CDDjEPSUHipZ2tTlLH51SBP 5IBTch/trotcksWVHzVDcFTWvA7sNV6JBy7LNjDRyNHLPxiHXly47sMmoqghwPUSoiVF1G qS4YnBllDp88qbVl3huxrSt8k9NnefI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FXnAMmDhseinqmOlgpPDC0ZLCDpX86ndHiGqskZjc9U=; b=Af0Db1DJuw9Wee1wmmF4ag80hHoTBI8Wlb5D9aiukXpuSRY4BYE7wpy0jKQWXTzIDcKMC+ XlHasrrBaZrg+AAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 296ED137BA; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YJmZCOMY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:55 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 10/89] ASoC: cs42l42: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:15 +0100 Message-ID: <20250313174139.29942-11-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 4FB19211B8 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs42l42-i2c.c | 6 +++--- sound/soc/codecs/cs42l42-sdw.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sound/soc/codecs/cs42l42-i2c.c b/sound/soc/codecs/cs42l42-i2c.c index 8a1d5c7a61d7..98b6718ccabf 100644 --- a/sound/soc/codecs/cs42l42-i2c.c +++ b/sound/soc/codecs/cs42l42-i2c.c @@ -48,7 +48,7 @@ static void cs42l42_i2c_remove(struct i2c_client *i2c_client) cs42l42_common_remove(cs42l42); } -static int __maybe_unused cs42l42_i2c_resume(struct device *dev) +static int cs42l42_i2c_resume(struct device *dev) { int ret; @@ -62,7 +62,7 @@ static int __maybe_unused cs42l42_i2c_resume(struct device *dev) } static const struct dev_pm_ops cs42l42_i2c_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l42_i2c_resume) + SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l42_i2c_resume) }; static const struct of_device_id __maybe_unused cs42l42_of_match[] = { @@ -87,7 +87,7 @@ MODULE_DEVICE_TABLE(i2c, cs42l42_id); static struct i2c_driver cs42l42_i2c_driver = { .driver = { .name = "cs42l42", - .pm = &cs42l42_i2c_pm_ops, + .pm = pm_ptr(&cs42l42_i2c_pm_ops), .of_match_table = of_match_ptr(cs42l42_of_match), .acpi_match_table = ACPI_PTR(cs42l42_acpi_match), }, diff --git a/sound/soc/codecs/cs42l42-sdw.c b/sound/soc/codecs/cs42l42-sdw.c index ae1401b250a3..f837c7eff10b 100644 --- a/sound/soc/codecs/cs42l42-sdw.c +++ b/sound/soc/codecs/cs42l42-sdw.c @@ -411,7 +411,7 @@ static const struct sdw_slave_ops cs42l42_sdw_ops = { .port_prep = cs42l42_sdw_port_prep, }; -static int __maybe_unused cs42l42_sdw_runtime_suspend(struct device *dev) +static int cs42l42_sdw_runtime_suspend(struct device *dev) { struct cs42l42_private *cs42l42 = dev_get_drvdata(dev); @@ -426,11 +426,11 @@ static int __maybe_unused cs42l42_sdw_runtime_suspend(struct device *dev) return 0; } -static const struct reg_sequence __maybe_unused cs42l42_soft_reboot_seq[] = { +static const struct reg_sequence cs42l42_soft_reboot_seq[] = { REG_SEQ0(CS42L42_SOFT_RESET_REBOOT, 0x1e), }; -static int __maybe_unused cs42l42_sdw_handle_unattach(struct cs42l42_private *cs42l42) +static int cs42l42_sdw_handle_unattach(struct cs42l42_private *cs42l42) { struct sdw_slave *peripheral = cs42l42->sdw_peripheral; @@ -460,7 +460,7 @@ static int __maybe_unused cs42l42_sdw_handle_unattach(struct cs42l42_private *cs return 0; } -static int __maybe_unused cs42l42_sdw_runtime_resume(struct device *dev) +static int cs42l42_sdw_runtime_resume(struct device *dev) { static const unsigned int ts_dbnce_ms[] = { 0, 125, 250, 500, 750, 1000, 1250, 1500}; struct cs42l42_private *cs42l42 = dev_get_drvdata(dev); @@ -491,7 +491,7 @@ static int __maybe_unused cs42l42_sdw_runtime_resume(struct device *dev) return 0; } -static int __maybe_unused cs42l42_sdw_resume(struct device *dev) +static int cs42l42_sdw_resume(struct device *dev) { struct cs42l42_private *cs42l42 = dev_get_drvdata(dev); int ret; @@ -596,8 +596,8 @@ static int cs42l42_sdw_remove(struct sdw_slave *peripheral) } static const struct dev_pm_ops cs42l42_sdw_pm = { - SET_SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l42_sdw_resume) - SET_RUNTIME_PM_OPS(cs42l42_sdw_runtime_suspend, cs42l42_sdw_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l42_sdw_resume) + RUNTIME_PM_OPS(cs42l42_sdw_runtime_suspend, cs42l42_sdw_runtime_resume, NULL) }; static const struct sdw_device_id cs42l42_sdw_id[] = { @@ -609,7 +609,7 @@ MODULE_DEVICE_TABLE(sdw, cs42l42_sdw_id); static struct sdw_driver cs42l42_sdw_driver = { .driver = { .name = "cs42l42-sdw", - .pm = &cs42l42_sdw_pm, + .pm = pm_ptr(&cs42l42_sdw_pm), }, .probe = cs42l42_sdw_probe, .remove = cs42l42_sdw_remove, From patchwork Thu Mar 13 17:40:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015597 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D6F718B470 for ; Thu, 13 Mar 2025 17:42:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887736; cv=none; b=piQjcK053scBt0M5hQUy6yQm/gGgZJitOsuiNTSFYVZHd3a0GKa8h9u+3OTYe7XiF2xrEuVW/6uvimW1RhRaXVYDguKmk/SlKKCEX3SzK4MZSy+8N+vm318CjLuz/8Vh1wMXlO7gW5BJuIGWMtYfgqDc6axNXrrckMv5H68q+M4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887736; c=relaxed/simple; bh=WZLJS6v2Dqe2w6ejXigx1L7p05bDIK48eriApru4/uE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CTjelJiLZbDSFlOtncgEt37/Iu4e2eEOTh+mOA9C9Ennp6P5J7BKRb7Wjl3BU0/m/2rPoP8y0xrTTO1F5PJfIZpe5eJRXKuTkSeIdr3DYXPGzAfGLkG90TTFFW4nQMc15KrxVMjECMmdPh9i/O8Nnd+PbUSlOhlaEfTBMn2AdiE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=2IuSqHIs; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=oQoBA0D0; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=2IuSqHIs; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=oQoBA0D0; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="2IuSqHIs"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="oQoBA0D0"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="2IuSqHIs"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="oQoBA0D0" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7F3E2211BF; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+nV58Tj3eEUhONazRBdG28zqirEiHrGNo8JKseqWXg=; b=2IuSqHIsVLtGFy6geWwFg1DBdkGKeel/QLMGQy9MtE1tlPdOMnytyG1MBgWXuq8A44IDNx kWwGIJPRGAOc96051r/icKZXbGWBIelxvmD9s2L+Y5TE6luTeIPVpHk2lc1rEH8t3pLThm FUUZpxqoQeZ1VSoxwDZKx5vsX2en0hM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+nV58Tj3eEUhONazRBdG28zqirEiHrGNo8JKseqWXg=; b=oQoBA0D0j+5JBlzstFlfa+BLhI/oyO/F+4r/PNeCg983oBLDaBlEQcOcVhdZEYOp50wW7m gCsSI3LFlIL9JpAQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=2IuSqHIs; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=oQoBA0D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+nV58Tj3eEUhONazRBdG28zqirEiHrGNo8JKseqWXg=; b=2IuSqHIsVLtGFy6geWwFg1DBdkGKeel/QLMGQy9MtE1tlPdOMnytyG1MBgWXuq8A44IDNx kWwGIJPRGAOc96051r/icKZXbGWBIelxvmD9s2L+Y5TE6luTeIPVpHk2lc1rEH8t3pLThm FUUZpxqoQeZ1VSoxwDZKx5vsX2en0hM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+nV58Tj3eEUhONazRBdG28zqirEiHrGNo8JKseqWXg=; b=oQoBA0D0j+5JBlzstFlfa+BLhI/oyO/F+4r/PNeCg983oBLDaBlEQcOcVhdZEYOp50wW7m gCsSI3LFlIL9JpAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 567FC139D2; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WMrTE+MY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:55 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 11/89] ASoC: cs42l51: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:16 +0100 Message-ID: <20250313174139.29942-12-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 7F3E2211BF X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS(). Also, drop superfluous __maybe_unused attributes to cs42l51_suspend() and _resume() functions. Merely a cleanup, there should be no actual code change. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs42l51-i2c.c | 2 +- sound/soc/codecs/cs42l51.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/cs42l51-i2c.c b/sound/soc/codecs/cs42l51-i2c.c index f171bd66fcac..ba7e237619f2 100644 --- a/sound/soc/codecs/cs42l51-i2c.c +++ b/sound/soc/codecs/cs42l51-i2c.c @@ -40,7 +40,7 @@ static void cs42l51_i2c_remove(struct i2c_client *i2c) } static const struct dev_pm_ops cs42l51_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(cs42l51_suspend, cs42l51_resume) + SYSTEM_SLEEP_PM_OPS(cs42l51_suspend, cs42l51_resume) }; static struct i2c_driver cs42l51_i2c_driver = { diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index 0602d03095d6..8083a339dc7b 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -805,7 +805,7 @@ void cs42l51_remove(struct device *dev) } EXPORT_SYMBOL_GPL(cs42l51_remove); -int __maybe_unused cs42l51_suspend(struct device *dev) +int cs42l51_suspend(struct device *dev) { struct cs42l51_private *cs42l51 = dev_get_drvdata(dev); @@ -816,7 +816,7 @@ int __maybe_unused cs42l51_suspend(struct device *dev) } EXPORT_SYMBOL_GPL(cs42l51_suspend); -int __maybe_unused cs42l51_resume(struct device *dev) +int cs42l51_resume(struct device *dev) { struct cs42l51_private *cs42l51 = dev_get_drvdata(dev); From patchwork Thu Mar 13 17:40:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015599 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8478D1B6CE3 for ; Thu, 13 Mar 2025 17:42:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887743; cv=none; b=hIbDA9FzbAOtwL4Tb5o7GStH76nlnj51beS+w0oY/Ol3sqNhxJZ60vREpN+FJ1Sggg7ONrwYup7sUd4BnZY+29jEnK/AghGz5x3DCFmI+GPmPir7Jt1Y4rG7IivKlLNQEmdE3hpSiJSpoPU6jqTlWyRDZJo7hyjo7foDgh3YnOU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887743; c=relaxed/simple; bh=1tgKOJF0ha2U4PxjT6ihgxam+eVyriIl0ctYVzfiOSs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sjZpOwi0L25MtmxS95+76Yf2J7aTCP5IlqdxBngJly2tK8NeJ8pB1y5UwdD36n4/ZTV72lXYTkvGyVjgjWxWEgiUmMob3rZqjgSr/G67lgixcSpK97c6kvArK3mxg02RRGmrlqLzZEH4rv6wOdCLI5Oeuqzi1z7J+o9VF2eNsyk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OsUcBfmf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IKHm2QKx; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OsUcBfmf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IKHm2QKx; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OsUcBfmf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IKHm2QKx"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OsUcBfmf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IKHm2QKx" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AE7DB211C6; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qvqg8KvNR/3pWsW/RgWoBcwRMU/y8PutngnJNx4cbsc=; b=OsUcBfmf+kQ+GFr3zsL//ULffSKRzK1Y2XKHZpaMAvFm8PtYP0RQRzdJrWLkP0BxT1nuHM fsRadx2bNLV9zlC2OK4ytLVrFEL3LAwXr8kcoKDgnJOrtXXNvZx6GzkVLTQi02bESpbNyU Op9Er8Nog/JhhK0w/kR9lvyjNqJNT0Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qvqg8KvNR/3pWsW/RgWoBcwRMU/y8PutngnJNx4cbsc=; b=IKHm2QKxm9BQcyjReA/yML+QGyBVaun0gH2piswCU/dV+c5UN0Wc1vqrPuUsDTRfRMg3H4 qWDjzI91X2eU/sAQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=OsUcBfmf; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=IKHm2QKx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qvqg8KvNR/3pWsW/RgWoBcwRMU/y8PutngnJNx4cbsc=; b=OsUcBfmf+kQ+GFr3zsL//ULffSKRzK1Y2XKHZpaMAvFm8PtYP0RQRzdJrWLkP0BxT1nuHM fsRadx2bNLV9zlC2OK4ytLVrFEL3LAwXr8kcoKDgnJOrtXXNvZx6GzkVLTQi02bESpbNyU Op9Er8Nog/JhhK0w/kR9lvyjNqJNT0Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qvqg8KvNR/3pWsW/RgWoBcwRMU/y8PutngnJNx4cbsc=; b=IKHm2QKxm9BQcyjReA/yML+QGyBVaun0gH2piswCU/dV+c5UN0Wc1vqrPuUsDTRfRMg3H4 qWDjzI91X2eU/sAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 86774137BA; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id UCuDH+MY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:55 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 12/89] ASoC: cs42l83: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:17 +0100 Message-ID: <20250313174139.29942-13-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: AE7DB211C6 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs42l83-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/cs42l83-i2c.c b/sound/soc/codecs/cs42l83-i2c.c index 42c3e1efdc08..53a7fe1ab3dd 100644 --- a/sound/soc/codecs/cs42l83-i2c.c +++ b/sound/soc/codecs/cs42l83-i2c.c @@ -199,7 +199,7 @@ static void cs42l83_i2c_remove(struct i2c_client *i2c_client) cs42l42_common_remove(cs42l83); } -static int __maybe_unused cs42l83_i2c_resume(struct device *dev) +static int cs42l83_i2c_resume(struct device *dev) { int ret; @@ -213,7 +213,7 @@ static int __maybe_unused cs42l83_i2c_resume(struct device *dev) } static const struct dev_pm_ops cs42l83_i2c_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l83_i2c_resume) + SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l83_i2c_resume) }; static const struct of_device_id __maybe_unused cs42l83_of_match[] = { @@ -225,7 +225,7 @@ MODULE_DEVICE_TABLE(of, cs42l83_of_match); static struct i2c_driver cs42l83_i2c_driver = { .driver = { .name = "cs42l83", - .pm = &cs42l83_i2c_pm_ops, + .pm = pm_ptr(&cs42l83_i2c_pm_ops), .of_match_table = of_match_ptr(cs42l83_of_match), }, .probe = cs42l83_i2c_probe, From patchwork Thu Mar 13 17:40:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015601 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB0581BB6BA for ; Thu, 13 Mar 2025 17:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887749; cv=none; b=t57hmJ+NZ6x5hYCEGWqWJqurUznIJXqd97aOQeBGiRXyAX1G04tmsytEqOnGh4qyN2GPJtwPPna9tWJCzMl3maqKHAEFQKnF+oIaMZZUrRqBfQVb1QWuXk+7QO2S9lSHkk3h/xYIsF5rFcDlQoer6CTxuD6uHcHVGpfgIbXPVwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887749; c=relaxed/simple; bh=BoZM7YN6tKYi4YeyGSpo1QZG1Qjp0yCo6+N/eD1jziY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BUi2/ha1NVQVTcMUCbNyNhSoxerKAHoErDNJmmJW7UqGQzR5olSUWs1cR25yx6KsxOdeUwPbzs2uycsisJb/rE/3RZj3tD9B+uXd3wFeo3vIIS5gPpIurt+BiTCd3JEsdCG0a7mygo3SXB9Mtz/tLn337tAEOKI99wBHy/by2rE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ASx0cHpi; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=VUjuqNsE; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ASx0cHpi; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=VUjuqNsE; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ASx0cHpi"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="VUjuqNsE"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ASx0cHpi"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="VUjuqNsE" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DC03C211CC; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yetasosDyatCB4jOnewxF2+DSLyeO5/d2WzABFf97hI=; b=ASx0cHpi3WmR1YgBrWoBC04NuvR95lFSCocHM9xxRcqvu66kON4oWOG1QYOJ9ybI4oFFvj 3WB7oLt/xG4cmEz4DRSz+R68ZLKakRUJx1+PcxdKB9GRH0As5EH+eukH0HPQcAFMUUujvD fSVy9vX2YNKKpd8i/1fXzHazJzYPwig= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yetasosDyatCB4jOnewxF2+DSLyeO5/d2WzABFf97hI=; b=VUjuqNsEamiC5TjDezw9kHmu0QXsFtRz/lzsBSZkGN6IREwmTOVEyoTv7oF5D8bl0l3rpr MTK+VpyPqKZxZKDA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ASx0cHpi; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=VUjuqNsE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yetasosDyatCB4jOnewxF2+DSLyeO5/d2WzABFf97hI=; b=ASx0cHpi3WmR1YgBrWoBC04NuvR95lFSCocHM9xxRcqvu66kON4oWOG1QYOJ9ybI4oFFvj 3WB7oLt/xG4cmEz4DRSz+R68ZLKakRUJx1+PcxdKB9GRH0As5EH+eukH0HPQcAFMUUujvD fSVy9vX2YNKKpd8i/1fXzHazJzYPwig= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887715; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yetasosDyatCB4jOnewxF2+DSLyeO5/d2WzABFf97hI=; b=VUjuqNsEamiC5TjDezw9kHmu0QXsFtRz/lzsBSZkGN6IREwmTOVEyoTv7oF5D8bl0l3rpr MTK+VpyPqKZxZKDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B51F3139D2; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0PzkKuMY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:55 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 13/89] ASoC: cs42xx8: Convert to EXPORT_GPL_DEV_PM_OPS() Date: Thu, 13 Mar 2025 18:40:18 +0100 Message-ID: <20250313174139.29942-14-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: DC03C211CC X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer EXPORT_GPL_DEV_PM_OPS() macro together with pm_ptr(), which allows us to drop superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs42xx8-i2c.c | 2 +- sound/soc/codecs/cs42xx8.c | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/cs42xx8-i2c.c b/sound/soc/codecs/cs42xx8-i2c.c index ecaebf8e1c8f..039b3ecb3b9b 100644 --- a/sound/soc/codecs/cs42xx8-i2c.c +++ b/sound/soc/codecs/cs42xx8-i2c.c @@ -61,7 +61,7 @@ MODULE_DEVICE_TABLE(i2c, cs42xx8_i2c_id); static struct i2c_driver cs42xx8_i2c_driver = { .driver = { .name = "cs42xx8", - .pm = &cs42xx8_pm, + .pm = pm_ptr(&cs42xx8_pm), .of_match_table = cs42xx8_of_match, }, .probe = cs42xx8_i2c_probe, diff --git a/sound/soc/codecs/cs42xx8.c b/sound/soc/codecs/cs42xx8.c index 8887db653dbf..6a925f3f7137 100644 --- a/sound/soc/codecs/cs42xx8.c +++ b/sound/soc/codecs/cs42xx8.c @@ -606,7 +606,6 @@ int cs42xx8_probe(struct device *dev, struct regmap *regmap, struct cs42xx8_driv } EXPORT_SYMBOL_GPL(cs42xx8_probe); -#ifdef CONFIG_PM static int cs42xx8_runtime_resume(struct device *dev) { struct cs42xx8_priv *cs42xx8 = dev_get_drvdata(dev); @@ -665,14 +664,11 @@ static int cs42xx8_runtime_suspend(struct device *dev) return 0; } -#endif -const struct dev_pm_ops cs42xx8_pm = { - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) - SET_RUNTIME_PM_OPS(cs42xx8_runtime_suspend, cs42xx8_runtime_resume, NULL) +EXPORT_GPL_DEV_PM_OPS(cs42xx8_pm) = { + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) + RUNTIME_PM_OPS(cs42xx8_runtime_suspend, cs42xx8_runtime_resume, NULL) }; -EXPORT_SYMBOL_GPL(cs42xx8_pm); MODULE_DESCRIPTION("Cirrus Logic CS42448/CS42888 ALSA SoC Codec Driver"); MODULE_AUTHOR("Freescale Semiconductor, Inc."); From patchwork Thu Mar 13 17:40:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015603 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E864198A2F for ; Thu, 13 Mar 2025 17:42:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887755; cv=none; b=oZwPFAN72sSij+BVnyIHvTvhp78ZalCBK4Vl0Dx4M034nJlPwoIBiVDv/oHEQmirQpppo4Q+/qzx3ieevSy9qeLB1k39Zzlezn9PpYG4jJ9MFkg07EtB+ZMAqHAGgMgsYVpbh+0U92dK3qntlDHa/vDOqwNW+m5XhzMwnpDc/v0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887755; c=relaxed/simple; bh=TKB4uAh5piGu2OtWAmKAf40w7VHzehhP/Mrz93avI9E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZUt3YXAkkyP5MHXkBYU20kFu02uTXRtcbzWtmKtkRTdPyyOBpb1GqZbfK+I/kiIBG1FLvpFlisuHeVAhaiBle4LLKRpDJDMIypguKEArzuYjhtgkZ9mrNZOT8jM6NN/7gDkWKReN+NEvsjTdzfMcSVF/D42z5BQG5DRFkDtUEQM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Iyr/Xh2C; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=EOcmcC3C; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Iyr/Xh2C; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=EOcmcC3C; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Iyr/Xh2C"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="EOcmcC3C"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Iyr/Xh2C"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="EOcmcC3C" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 12BD1211C4; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MgHxNtMkLoqxYgwegkw0r3bvApoBNxgWaEwegdYq8WE=; b=Iyr/Xh2CZXYzXrjUFdSRQo3/gJhQAqQRqgO0WmXJdkvho10t2eCCZ6Iv141Y9pCaY4Dc4n lw9ksHPZvs7cWEXaHNIYBsieimwJEHeWQon6SbUkZABwhY4qDNP4rki5Pufez+heXMaAOm H7Z97gy3urey9yEjhyG2TwbwyIOmHYs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MgHxNtMkLoqxYgwegkw0r3bvApoBNxgWaEwegdYq8WE=; b=EOcmcC3ChodboFJ6gpeGDK9DR9v/B342gdd0Qu79+qx6HwDqYkQ0KNLk4GXX7qqTbYv0rY oCpBI4etRIvPLoCQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MgHxNtMkLoqxYgwegkw0r3bvApoBNxgWaEwegdYq8WE=; b=Iyr/Xh2CZXYzXrjUFdSRQo3/gJhQAqQRqgO0WmXJdkvho10t2eCCZ6Iv141Y9pCaY4Dc4n lw9ksHPZvs7cWEXaHNIYBsieimwJEHeWQon6SbUkZABwhY4qDNP4rki5Pufez+heXMaAOm H7Z97gy3urey9yEjhyG2TwbwyIOmHYs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MgHxNtMkLoqxYgwegkw0r3bvApoBNxgWaEwegdYq8WE=; b=EOcmcC3ChodboFJ6gpeGDK9DR9v/B342gdd0Qu79+qx6HwDqYkQ0KNLk4GXX7qqTbYv0rY oCpBI4etRIvPLoCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E1D15137BA; Thu, 13 Mar 2025 17:41:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id IKvlNeMY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:55 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 14/89] ASoC: cs43130: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:19 +0100 Message-ID: <20250313174139.29942-15-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs43130.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c index cd535be0b4ba..d9b3d73c8388 100644 --- a/sound/soc/codecs/cs43130.c +++ b/sound/soc/codecs/cs43130.c @@ -2672,7 +2672,7 @@ static void cs43130_i2c_remove(struct i2c_client *client) regulator_bulk_disable(CS43130_NUM_SUPPLIES, cs43130->supplies); } -static int __maybe_unused cs43130_runtime_suspend(struct device *dev) +static int cs43130_runtime_suspend(struct device *dev) { struct cs43130_private *cs43130 = dev_get_drvdata(dev); @@ -2691,7 +2691,7 @@ static int __maybe_unused cs43130_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused cs43130_runtime_resume(struct device *dev) +static int cs43130_runtime_resume(struct device *dev) { struct cs43130_private *cs43130 = dev_get_drvdata(dev); int ret; @@ -2727,8 +2727,7 @@ static int __maybe_unused cs43130_runtime_resume(struct device *dev) } static const struct dev_pm_ops cs43130_runtime_pm = { - SET_RUNTIME_PM_OPS(cs43130_runtime_suspend, cs43130_runtime_resume, - NULL) + RUNTIME_PM_OPS(cs43130_runtime_suspend, cs43130_runtime_resume, NULL) }; #if IS_ENABLED(CONFIG_OF) @@ -2768,7 +2767,7 @@ static struct i2c_driver cs43130_i2c_driver = { .name = "cs43130", .of_match_table = of_match_ptr(cs43130_of_match), .acpi_match_table = ACPI_PTR(cs43130_acpi_match), - .pm = &cs43130_runtime_pm, + .pm = pm_ptr(&cs43130_runtime_pm), }, .id_table = cs43130_i2c_id, .probe = cs43130_i2c_probe, From patchwork Thu Mar 13 17:40:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015605 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B0F51C57B2 for ; Thu, 13 Mar 2025 17:42:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887761; cv=none; b=lvVwGi9kr2dlgp/dMPLpKvDPzESAOiH94ozWYaInq0wiZvNAI8uocQzlBpAmu+ZIjNG/Kuh2JEP/o0PBDlZ0M4ofVIRqAMmZ9cfToLeOV28O3nkfT7jwqAmVOXYyWCHzKWRJVtyJlT1Lv3v3oG5aySKMek0aQNQc2OdTxCMEOWc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887761; c=relaxed/simple; bh=AbT0iHBFwPap6hLM1PyHw5x0AKjQQp4IrP34SJoH7+I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=azdv9fDmNXJfShLyX7o7MCTVgrWWdcllkGr6xwWY/ElWCOCmnBTgwNjlXn9JLU+DxouYt4F69aH2qB+HZMY+mN7rSNXYh3P8G5KWeXFn1YQmHRdCmONexDhlFHumigYmhF+hZp7r2S2v0Jw9ufh6fBLMbv5ytRZLBJvU9ud2o0w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=iiegpCGR; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eRmojU4o; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=iiegpCGR; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eRmojU4o; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="iiegpCGR"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eRmojU4o"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="iiegpCGR"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eRmojU4o" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3FDB3211C9; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M96ixhZ6XvpK4kM5hmUpx0wepBg+OUe6u8i+/Y/FKm8=; b=iiegpCGRDj1NcJ6R081X6J2Qw8fo9y6GOSt4j4i2NipuT8pulMAyzqTJFolNJXR/InBh2+ 0sspbcqiwkleCC3YibawjsdIog3nrIoizuBZfxk9HuE3NRN9PvkjGcnCa8QrrEoRD4W43S ux5/mX86fr3xWIXKXsn8paxZL6wQjE4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M96ixhZ6XvpK4kM5hmUpx0wepBg+OUe6u8i+/Y/FKm8=; b=eRmojU4oR/QawjpdjwRHPvxnvNFVSJjIPBjVdersu+tX4NdSUX/+FxJetLFMyTv5inPdg0 uZVRKDhKvmgqDfBg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M96ixhZ6XvpK4kM5hmUpx0wepBg+OUe6u8i+/Y/FKm8=; b=iiegpCGRDj1NcJ6R081X6J2Qw8fo9y6GOSt4j4i2NipuT8pulMAyzqTJFolNJXR/InBh2+ 0sspbcqiwkleCC3YibawjsdIog3nrIoizuBZfxk9HuE3NRN9PvkjGcnCa8QrrEoRD4W43S ux5/mX86fr3xWIXKXsn8paxZL6wQjE4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M96ixhZ6XvpK4kM5hmUpx0wepBg+OUe6u8i+/Y/FKm8=; b=eRmojU4oR/QawjpdjwRHPvxnvNFVSJjIPBjVdersu+tX4NdSUX/+FxJetLFMyTv5inPdg0 uZVRKDhKvmgqDfBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 19C6C139D2; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2FL4BOQY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:56 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 15/89] ASoC: cs4349: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:20 +0100 Message-ID: <20250313174139.29942-16-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs4349.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c index a134ca722892..d9a9c34fffe3 100644 --- a/sound/soc/codecs/cs4349.c +++ b/sound/soc/codecs/cs4349.c @@ -312,7 +312,6 @@ static void cs4349_i2c_remove(struct i2c_client *client) gpiod_set_value_cansleep(cs4349->reset_gpio, 0); } -#ifdef CONFIG_PM static int cs4349_runtime_suspend(struct device *dev) { struct cs4349_private *cs4349 = dev_get_drvdata(dev); @@ -346,11 +345,9 @@ static int cs4349_runtime_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops cs4349_runtime_pm = { - SET_RUNTIME_PM_OPS(cs4349_runtime_suspend, cs4349_runtime_resume, - NULL) + RUNTIME_PM_OPS(cs4349_runtime_suspend, cs4349_runtime_resume, NULL) }; static const struct of_device_id cs4349_of_match[] = { @@ -371,7 +368,7 @@ static struct i2c_driver cs4349_i2c_driver = { .driver = { .name = "cs4349", .of_match_table = cs4349_of_match, - .pm = &cs4349_runtime_pm, + .pm = pm_ptr(&cs4349_runtime_pm), }, .id_table = cs4349_i2c_id, .probe = cs4349_i2c_probe, From patchwork Thu Mar 13 17:40:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015606 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27E7718F2FC for ; Thu, 13 Mar 2025 17:42:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887766; cv=none; b=Xcz9mepx2k1hiSK7Wk2a82zcMekZRBfKoj38MXm8+Dup0VlLguPacDXS/duTW2IrQpwdQr9vS87ZiWIMooox58X1PSUQl1ntRk4G1fvFJW8tu5Pklg0pwTlt07gl43G5dRUOai1lWzPV34qRLSPYXSmtfRXNN2APBPaO4N32wEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887766; c=relaxed/simple; bh=LUu6Ge4VF1xrAhcZ3IpmZvJeuwdnMz3sOifOB9yOC30=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WgNeR6UaZlvT16G9V55o8dkSpm1xFN642bamHZJjWoEw7i8pX/+85gIWkFuTg5iFg2NSbqImIL4M/Uwaipkk2+T1BcEIjMz1aNYOgUZy0L39Dj0Gm/kuv0DfWirntQrPoFDAxFo6Vcu3SqODRCq06VGH5O20M+MKOu2du1pReAE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cY06diqd; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=3ZSmZa8l; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cY06diqd; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=3ZSmZa8l; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cY06diqd"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3ZSmZa8l"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cY06diqd"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3ZSmZa8l" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 711951F78E; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dynDfa+Z5gXLI6uo6t6/TdTCn0yvgYY027A/rS+6zlw=; b=cY06diqdcUpicsbML1mU2WvSa4u3l4ctzW/ZgJiN2Sxax4Pc6KK/oeT6glWr+qG83VuShB OE4MstfoSWVyyHDp1q5nXIwSLaAUfXp40XqT0oLC49FWR8boTIQzmhQCJa8p6u7/3PfMzf p4Ec2UOI5qIp3K3HL4A5s95j+mifI/Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dynDfa+Z5gXLI6uo6t6/TdTCn0yvgYY027A/rS+6zlw=; b=3ZSmZa8lYOhQIITP/sbE7zFZ2QQOCGaX3k1o6cQNCPuDLEI6Vb2X+CmhRegdpBwFkBxGKQ rKngJMeSXP+rZgDQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=cY06diqd; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=3ZSmZa8l DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dynDfa+Z5gXLI6uo6t6/TdTCn0yvgYY027A/rS+6zlw=; b=cY06diqdcUpicsbML1mU2WvSa4u3l4ctzW/ZgJiN2Sxax4Pc6KK/oeT6glWr+qG83VuShB OE4MstfoSWVyyHDp1q5nXIwSLaAUfXp40XqT0oLC49FWR8boTIQzmhQCJa8p6u7/3PfMzf p4Ec2UOI5qIp3K3HL4A5s95j+mifI/Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dynDfa+Z5gXLI6uo6t6/TdTCn0yvgYY027A/rS+6zlw=; b=3ZSmZa8lYOhQIITP/sbE7zFZ2QQOCGaX3k1o6cQNCPuDLEI6Vb2X+CmhRegdpBwFkBxGKQ rKngJMeSXP+rZgDQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 46814137BA; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id eGDgD+QY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:56 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 16/89] ASoC: cs53l30: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:21 +0100 Message-ID: <20250313174139.29942-17-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 711951F78E X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/cs53l30.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c index aea4244fb275..61bf72681674 100644 --- a/sound/soc/codecs/cs53l30.c +++ b/sound/soc/codecs/cs53l30.c @@ -1031,7 +1031,6 @@ static void cs53l30_i2c_remove(struct i2c_client *client) cs53l30->supplies); } -#ifdef CONFIG_PM static int cs53l30_runtime_suspend(struct device *dev) { struct cs53l30_private *cs53l30 = dev_get_drvdata(dev); @@ -1070,11 +1069,9 @@ static int cs53l30_runtime_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops cs53l30_runtime_pm = { - SET_RUNTIME_PM_OPS(cs53l30_runtime_suspend, cs53l30_runtime_resume, - NULL) + RUNTIME_PM_OPS(cs53l30_runtime_suspend, cs53l30_runtime_resume, NULL) }; static const struct of_device_id cs53l30_of_match[] = { @@ -1095,7 +1092,7 @@ static struct i2c_driver cs53l30_i2c_driver = { .driver = { .name = "cs53l30", .of_match_table = cs53l30_of_match, - .pm = &cs53l30_runtime_pm, + .pm = pm_ptr(&cs53l30_runtime_pm), }, .id_table = cs53l30_id, .probe = cs53l30_i2c_probe, From patchwork Thu Mar 13 17:40:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015607 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 960211C84B6 for ; Thu, 13 Mar 2025 17:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887768; cv=none; b=QhbdCezZdJWYflQhm64aLqtlAo7QRfUEmt1U4qdlynNjbMqsObEzkZsMKSVikE9DK1ulpcZ3p1UeKGFU4j1QN/GqzX8Ziqcujs8rGhShfZduss0/7n59NwtWRWg6dEFFJYX5HhC/RuJd4VCHeexUAiCzqpNIVSatJcG9ews21wY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887768; c=relaxed/simple; bh=sCPBGvHSYV093T+v1wPBO5KEyZbXadnc8ibRqg0MrMg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cZR+joC3uvCSebwmQmjeEvw6NQFdWM6u0e8J4mWsp8Tj1nBe7CiRiL50Kz1/ExCkyA4NtqT5uMWpcAibVBjHKXRm7fEoQIp9FAcYzzDa1gG6md7uQ8QmY60fPE7Cw0RkWWdaHiuwpxGOaQs1sXFysahGr4L7y0IezOFdSWb8tOQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=VAY/5j3G; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Sg+gmV0t; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=VAY/5j3G; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Sg+gmV0t; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="VAY/5j3G"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Sg+gmV0t"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="VAY/5j3G"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Sg+gmV0t" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9B85A211CD; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XogWZgJWVLqVKeojjAPBnMGwcdI6XgP4tbk7gS+xstQ=; b=VAY/5j3GW1nvvqhM8ki0a93hJ9SqAASe9mtcMorgEiuSTxUzY5IRMDXjKf+gCrYosHxU+X p22CeZ6eKW3lQO890k8b4HLXZMs13KJraeoI6N+2SiJ11xPoFiBsSbpXVIoFvY7MWtDNMZ DG/48A7ZeMRYcyIqr4FlZ1Waekj03A0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XogWZgJWVLqVKeojjAPBnMGwcdI6XgP4tbk7gS+xstQ=; b=Sg+gmV0tzQNZCkVstPpG/bF4V5wo+54C24jjry677CuW2DmsoEltPGKDg4PdnFyWth0EV+ +Mc7SgGO13W6/sAw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XogWZgJWVLqVKeojjAPBnMGwcdI6XgP4tbk7gS+xstQ=; b=VAY/5j3GW1nvvqhM8ki0a93hJ9SqAASe9mtcMorgEiuSTxUzY5IRMDXjKf+gCrYosHxU+X p22CeZ6eKW3lQO890k8b4HLXZMs13KJraeoI6N+2SiJ11xPoFiBsSbpXVIoFvY7MWtDNMZ DG/48A7ZeMRYcyIqr4FlZ1Waekj03A0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XogWZgJWVLqVKeojjAPBnMGwcdI6XgP4tbk7gS+xstQ=; b=Sg+gmV0tzQNZCkVstPpG/bF4V5wo+54C24jjry677CuW2DmsoEltPGKDg4PdnFyWth0EV+ +Mc7SgGO13W6/sAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7A943139D2; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0HWTHOQY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:56 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 17/89] ASoC: cx2072x: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:22 +0100 Message-ID: <20250313174139.29942-18-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/cx2072x.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/codecs/cx2072x.c index 8cfec8dcf839..934526f8f292 100644 --- a/sound/soc/codecs/cx2072x.c +++ b/sound/soc/codecs/cx2072x.c @@ -1611,7 +1611,7 @@ static const struct regmap_config cx2072x_regmap = { .reg_write = cx2072x_reg_write, }; -static int __maybe_unused cx2072x_runtime_suspend(struct device *dev) +static int cx2072x_runtime_suspend(struct device *dev) { struct cx2072x_priv *cx2072x = dev_get_drvdata(dev); @@ -1619,7 +1619,7 @@ static int __maybe_unused cx2072x_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused cx2072x_runtime_resume(struct device *dev) +static int cx2072x_runtime_resume(struct device *dev) { struct cx2072x_priv *cx2072x = dev_get_drvdata(dev); @@ -1696,17 +1696,15 @@ MODULE_DEVICE_TABLE(acpi, cx2072x_acpi_match); #endif static const struct dev_pm_ops cx2072x_runtime_pm = { - SET_RUNTIME_PM_OPS(cx2072x_runtime_suspend, cx2072x_runtime_resume, - NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(cx2072x_runtime_suspend, cx2072x_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct i2c_driver cx2072x_i2c_driver = { .driver = { .name = "cx2072x", .acpi_match_table = ACPI_PTR(cx2072x_acpi_match), - .pm = &cx2072x_runtime_pm, + .pm = pm_ptr(&cx2072x_runtime_pm), }, .probe = cx2072x_i2c_probe, .remove = cx2072x_i2c_remove, From patchwork Thu Mar 13 17:40:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015609 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59BEC1C84A8 for ; Thu, 13 Mar 2025 17:42:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887774; cv=none; b=kdOFsTCY5eAbMvMaRyhcvlxqafTI8GypfLCWNBYJkfFU4r030WMKeuQdGybqn0DMImaaz0M9IfARlN2w5eWGXarbULEa/gvoNHQX6phW1lveUgn6aDC7nEdgizkVGV8mtTXTXo75YO56GKWeBHI6Bk2wPGNd2g8Q9hpGIGKmg4g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887774; c=relaxed/simple; bh=XCQGVWqY83crVvR7+MN5DlbFSjeo8zpd0tusTHqgquo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VLHlSLkwA1FNdmtURznhQ9HMerx+XpwPR0DScvW0NjGzIchzgNXK2Rc1O7252GK33OzuLTrbx9IYc70py/Dls0s12FEkja71f61NB7j8yRQSAH8UIHgqgd5IKGDjGkEwypJx31BvWrmsXAhEOleKUpfVjt3rPyz3Q4FXkgOC3XI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=atZutl6X; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=fC3xqvql; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=atZutl6X; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=fC3xqvql; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="atZutl6X"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fC3xqvql"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="atZutl6X"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fC3xqvql" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C9200211CF; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/oMOUaJhH/X82nw91DCsWjhXXB0+M2/idirdQriqrQ=; b=atZutl6XeF9HVL/S8unh4iwthUTJ9Q5aNMpwPRuJVpEX6Y61SUmOJJM/T3uAMIchYoiN3Y w50fGozK5JNFHGM+1BHFCHfz1/nbVajzwwvmejj8ESvIZMpHDgVF6TkuEoREhWtYdT2hyg qf8SCtw2KcTwB3wOD4x1QRNHypgABTs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/oMOUaJhH/X82nw91DCsWjhXXB0+M2/idirdQriqrQ=; b=fC3xqvqlrVsXBT5Hio1fQp+8wGL9SZ5YZ0n7Tg/JhnqjnoSunCu8A88RQdBJG+CxQXnPu9 COuxn4Ws1R62qkCQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=atZutl6X; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fC3xqvql DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/oMOUaJhH/X82nw91DCsWjhXXB0+M2/idirdQriqrQ=; b=atZutl6XeF9HVL/S8unh4iwthUTJ9Q5aNMpwPRuJVpEX6Y61SUmOJJM/T3uAMIchYoiN3Y w50fGozK5JNFHGM+1BHFCHfz1/nbVajzwwvmejj8ESvIZMpHDgVF6TkuEoREhWtYdT2hyg qf8SCtw2KcTwB3wOD4x1QRNHypgABTs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/oMOUaJhH/X82nw91DCsWjhXXB0+M2/idirdQriqrQ=; b=fC3xqvqlrVsXBT5Hio1fQp+8wGL9SZ5YZ0n7Tg/JhnqjnoSunCu8A88RQdBJG+CxQXnPu9 COuxn4Ws1R62qkCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A2BC2137BA; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id +OxJJuQY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:56 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, support.opensource@diasemi.com Subject: [PATCH 18/89] ASoC: da7213: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:23 +0100 Message-ID: <20250313174139.29942-19-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: C9200211CF X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: support.opensource@diasemi.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/da7213.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c index eb97ac73ec06..a4496cc26902 100644 --- a/sound/soc/codecs/da7213.c +++ b/sound/soc/codecs/da7213.c @@ -2224,7 +2224,7 @@ static void da7213_i2c_remove(struct i2c_client *i2c) pm_runtime_disable(&i2c->dev); } -static int __maybe_unused da7213_runtime_suspend(struct device *dev) +static int da7213_runtime_suspend(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); @@ -2235,7 +2235,7 @@ static int __maybe_unused da7213_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused da7213_runtime_resume(struct device *dev) +static int da7213_runtime_resume(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); int ret; @@ -2248,8 +2248,8 @@ static int __maybe_unused da7213_runtime_resume(struct device *dev) } static const struct dev_pm_ops da7213_pm = { - SET_RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) + RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static const struct i2c_device_id da7213_i2c_id[] = { @@ -2264,7 +2264,7 @@ static struct i2c_driver da7213_i2c_driver = { .name = "da7213", .of_match_table = of_match_ptr(da7213_of_match), .acpi_match_table = ACPI_PTR(da7213_acpi_match), - .pm = &da7213_pm, + .pm = pm_ptr(&da7213_pm), }, .probe = da7213_i2c_probe, .remove = da7213_i2c_remove, From patchwork Thu Mar 13 17:40:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015611 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D1DD1B6CE3 for ; Thu, 13 Mar 2025 17:43:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887782; cv=none; b=Fn2aKbcMqe95k6BHaSZ3QvWf34o3zDA3X9frv0qMv+Pe2Bf00jt4NPym5aM+4NV179kkGLW9/WQvhGTX/1gXpMY9FNfZk30p52r+XiNVrRCTl3zzwk25It3FBmEjhSeV70w+Xtx6XG9W3ixJt68OR0wS1NIT/Iv/nZFQpJmJ8b0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887782; c=relaxed/simple; bh=2ZWSiX+XG0vDzaFjtSRqDpMjCnpWChk2gnTnw8EXxFE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=frUP7T5W//aEmEohV6VZHMZYfBJhWKCqbVtxyTDxzoj92bYaO7fv0RgHI3phKiLOJT70ba3Nbpe/GLAr3UQfK0Yt2nP1BGdXwqqLbvq+HSg2SuN76cwgcE9jmoVCpykRvyd7okN/sJzhl3jmPvgdxsooQOiHKcmtellCUotpnVA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=o3Od1dwa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HPVNMb/U; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=FF1Xr12B; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=kIjQTqr5; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="o3Od1dwa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HPVNMb/U"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="FF1Xr12B"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="kIjQTqr5" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F1BD0211D0; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gwWntg5AzrP/kEf/VbYrKMm59OKmTtQ3JTbuK+8ErSw=; b=o3Od1dwaHLmxNGj5Wp32uzKBAJESN1r4biQ53yZN/o/bQCwVy7dC26wVl4P3ret9rcA19K dA49c1nq9nLwVv2JXDcoVj6PuGbF5w8nLYZ9L6kznKECfMaFx2OfBrac+6Ghi9NXcHtsqM xWixcl1RcUCU2Ys79SZnljvJLM60RMs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gwWntg5AzrP/kEf/VbYrKMm59OKmTtQ3JTbuK+8ErSw=; b=HPVNMb/UZEg2d+yO2iM6rcWKSluY2/GB+4HKFcaq/WdRgXM59KIESYv26ujw1UXdArq0S1 0bOXjtDPqlysaOAA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gwWntg5AzrP/kEf/VbYrKMm59OKmTtQ3JTbuK+8ErSw=; b=FF1Xr12BZbgCHbmclfEgKmRciH3zLrR0YJE8PXh/nZB5If9gsnniWU6jAQ069eYXvgNieB 8Z5geOHR5Ao5X71x4qFKj+XGcQjb9BV/RVAAULrWh6Cjs2fT5lXQHCus/JPeMZhH6PIXJN Fs916WxOArEHCmf7P32Hk3UdoLvU/LM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887716; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gwWntg5AzrP/kEf/VbYrKMm59OKmTtQ3JTbuK+8ErSw=; b=kIjQTqr5H326XYjnKjA6xNDFUdTj2cOAhlGPDl9z85xRfVuy2nLq8PsorsdzWg3MW/Gjyb p4fHBpPaPG1eRXAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CF313139D2; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id kBFfMeQY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:56 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 19/89] ASoC: hdac_hdmi: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:24 +0100 Message-ID: <20250313174139.29942-20-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/hdac_hdmi.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 3bea5d09219a..1139a2754ca3 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -2032,7 +2032,6 @@ static void hdmi_codec_remove(struct snd_soc_component *component) pm_runtime_disable(&hdev->dev); } -#ifdef CONFIG_PM_SLEEP static int hdmi_codec_resume(struct device *dev) { struct hdac_device *hdev = dev_to_hdac_dev(dev); @@ -2055,9 +2054,6 @@ static int hdmi_codec_resume(struct device *dev) hdac_hdmi_present_sense_all_pins(hdev, hdmi, false); return 0; } -#else -#define hdmi_codec_resume NULL -#endif static const struct snd_soc_component_driver hdmi_hda_codec = { .probe = hdmi_codec_probe, @@ -2227,7 +2223,6 @@ static int hdac_hdmi_dev_remove(struct hdac_device *hdev) return 0; } -#ifdef CONFIG_PM static int hdac_hdmi_runtime_suspend(struct device *dev) { struct hdac_device *hdev = dev_to_hdac_dev(dev); @@ -2296,14 +2291,10 @@ static int hdac_hdmi_runtime_resume(struct device *dev) return 0; } -#else -#define hdac_hdmi_runtime_suspend NULL -#define hdac_hdmi_runtime_resume NULL -#endif static const struct dev_pm_ops hdac_hdmi_pm = { - SET_RUNTIME_PM_OPS(hdac_hdmi_runtime_suspend, hdac_hdmi_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, hdmi_codec_resume) + RUNTIME_PM_OPS(hdac_hdmi_runtime_suspend, hdac_hdmi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, hdmi_codec_resume) }; static const struct hda_device_id hdmi_list[] = { @@ -2322,7 +2313,7 @@ MODULE_DEVICE_TABLE(hdaudio, hdmi_list); static struct hdac_driver hdmi_driver = { .driver = { .name = "HDMI HDA Codec", - .pm = &hdac_hdmi_pm, + .pm = pm_ptr(&hdac_hdmi_pm), }, .id_table = hdmi_list, .probe = hdac_hdmi_dev_probe, From patchwork Thu Mar 13 17:40:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015613 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76C8E1C5D62 for ; Thu, 13 Mar 2025 17:43:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887788; cv=none; b=sa09fLulSW9T4+vPzNnBRGtHeOEsiTJtK0VzQDdU6j0QBOHVOBw1i8QKwFQicz1ehleXSuNezE1DzuEcCxhOYDuBRB4Ie/S38FIAngnywrPJ/rn+O/XsUCANQS1fBNAmExUCgjVHtODQkN2hOA+NaLG9svhlmUp7xZXhh0FgIXI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887788; c=relaxed/simple; bh=DAlvv/RgUbPEqdTi7SvG7HM9ch+BGU8PzzH+dHwxlt0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dabsvkUizBV52JkzN5MKCfWiYoTN/+NEuI/MzMfdkyrmRsdCmB5EAIl3MjQSgWkXNuX92Nafkv/pAxL5SxMReIMxEUZntFJqoA1D10VTkglPpJtaDmbPz7hiuU0BryLczInzwvV4gkerkoIq/Hr0aQIhx3Rz1cTia/TB+qrGpeI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Cmjh23fa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=S4ilbF3j; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Cmjh23fa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=S4ilbF3j; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Cmjh23fa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="S4ilbF3j"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Cmjh23fa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="S4ilbF3j" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2B659211D2; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ypKQqc+0SSYoP+r5PpRCIgpJOmvoOfujusZYA1GVhe0=; b=Cmjh23faJChDfsNi7FCzS/ckkTfy1rRVrAV36LbJgOPFk/09wnXEZ2s6FsDCxJKdFCuAND Q6ImvXPvVmetI2M0c6Kc8ViGz9pg0YcyD6kvN3wFTl0KG744Uz3uLi/UMofg8lcni872P9 ITnuvLcWb5nC+f3MtP8RZ7uQZpmS1qs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ypKQqc+0SSYoP+r5PpRCIgpJOmvoOfujusZYA1GVhe0=; b=S4ilbF3jC5d2vvkpGv8O4pS2o1+z4GokPKPHuSrjELDnFOB1rlt/CfowRa7RWK+SFbh+mJ nvYB/6J184RE+oDQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Cmjh23fa; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=S4ilbF3j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ypKQqc+0SSYoP+r5PpRCIgpJOmvoOfujusZYA1GVhe0=; b=Cmjh23faJChDfsNi7FCzS/ckkTfy1rRVrAV36LbJgOPFk/09wnXEZ2s6FsDCxJKdFCuAND Q6ImvXPvVmetI2M0c6Kc8ViGz9pg0YcyD6kvN3wFTl0KG744Uz3uLi/UMofg8lcni872P9 ITnuvLcWb5nC+f3MtP8RZ7uQZpmS1qs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ypKQqc+0SSYoP+r5PpRCIgpJOmvoOfujusZYA1GVhe0=; b=S4ilbF3jC5d2vvkpGv8O4pS2o1+z4GokPKPHuSrjELDnFOB1rlt/CfowRa7RWK+SFbh+mJ nvYB/6J184RE+oDQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0369713A24; Thu, 13 Mar 2025 17:41:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ON8RO+QY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:56 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 20/89] ASoC: lpass: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:25 +0100 Message-ID: <20250313174139.29942-21-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 2B659211D2 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Srinivas Kandagatla Signed-off-by: Takashi Iwai --- sound/soc/codecs/lpass-rx-macro.c | 8 ++++---- sound/soc/codecs/lpass-tx-macro.c | 8 ++++---- sound/soc/codecs/lpass-va-macro.c | 8 ++++---- sound/soc/codecs/lpass-wsa-macro.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index febbbe073962..45a6b83808b2 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -3963,7 +3963,7 @@ static const struct of_device_id rx_macro_dt_match[] = { }; MODULE_DEVICE_TABLE(of, rx_macro_dt_match); -static int __maybe_unused rx_macro_runtime_suspend(struct device *dev) +static int rx_macro_runtime_suspend(struct device *dev) { struct rx_macro *rx = dev_get_drvdata(dev); @@ -3977,7 +3977,7 @@ static int __maybe_unused rx_macro_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused rx_macro_runtime_resume(struct device *dev) +static int rx_macro_runtime_resume(struct device *dev) { struct rx_macro *rx = dev_get_drvdata(dev); int ret; @@ -4012,7 +4012,7 @@ static int __maybe_unused rx_macro_runtime_resume(struct device *dev) } static const struct dev_pm_ops rx_macro_pm_ops = { - SET_RUNTIME_PM_OPS(rx_macro_runtime_suspend, rx_macro_runtime_resume, NULL) + RUNTIME_PM_OPS(rx_macro_runtime_suspend, rx_macro_runtime_resume, NULL) }; static struct platform_driver rx_macro_driver = { @@ -4020,7 +4020,7 @@ static struct platform_driver rx_macro_driver = { .name = "rx_macro", .of_match_table = rx_macro_dt_match, .suppress_bind_attrs = true, - .pm = &rx_macro_pm_ops, + .pm = pm_ptr(&rx_macro_pm_ops), }, .probe = rx_macro_probe, .remove = rx_macro_remove, diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index a134584acf90..27bae58f4072 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -2400,7 +2400,7 @@ static void tx_macro_remove(struct platform_device *pdev) lpass_macro_pds_exit(tx->pds); } -static int __maybe_unused tx_macro_runtime_suspend(struct device *dev) +static int tx_macro_runtime_suspend(struct device *dev) { struct tx_macro *tx = dev_get_drvdata(dev); @@ -2414,7 +2414,7 @@ static int __maybe_unused tx_macro_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tx_macro_runtime_resume(struct device *dev) +static int tx_macro_runtime_resume(struct device *dev) { struct tx_macro *tx = dev_get_drvdata(dev); int ret; @@ -2450,7 +2450,7 @@ static int __maybe_unused tx_macro_runtime_resume(struct device *dev) } static const struct dev_pm_ops tx_macro_pm_ops = { - SET_RUNTIME_PM_OPS(tx_macro_runtime_suspend, tx_macro_runtime_resume, NULL) + RUNTIME_PM_OPS(tx_macro_runtime_suspend, tx_macro_runtime_resume, NULL) }; static const struct tx_macro_data lpass_ver_9 = { @@ -2531,7 +2531,7 @@ static struct platform_driver tx_macro_driver = { .name = "tx_macro", .of_match_table = tx_macro_dt_match, .suppress_bind_attrs = true, - .pm = &tx_macro_pm_ops, + .pm = pm_ptr(&tx_macro_pm_ops), }, .probe = tx_macro_probe, .remove = tx_macro_remove, diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index c781da476240..74ada6e77526 100644 --- a/sound/soc/codecs/lpass-va-macro.c +++ b/sound/soc/codecs/lpass-va-macro.c @@ -1674,7 +1674,7 @@ static void va_macro_remove(struct platform_device *pdev) lpass_macro_pds_exit(va->pds); } -static int __maybe_unused va_macro_runtime_suspend(struct device *dev) +static int va_macro_runtime_suspend(struct device *dev) { struct va_macro *va = dev_get_drvdata(dev); @@ -1689,7 +1689,7 @@ static int __maybe_unused va_macro_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused va_macro_runtime_resume(struct device *dev) +static int va_macro_runtime_resume(struct device *dev) { struct va_macro *va = dev_get_drvdata(dev); int ret; @@ -1717,7 +1717,7 @@ static int __maybe_unused va_macro_runtime_resume(struct device *dev) static const struct dev_pm_ops va_macro_pm_ops = { - SET_RUNTIME_PM_OPS(va_macro_runtime_suspend, va_macro_runtime_resume, NULL) + RUNTIME_PM_OPS(va_macro_runtime_suspend, va_macro_runtime_resume, NULL) }; static const struct of_device_id va_macro_dt_match[] = { @@ -1735,7 +1735,7 @@ static struct platform_driver va_macro_driver = { .name = "va_macro", .of_match_table = va_macro_dt_match, .suppress_bind_attrs = true, - .pm = &va_macro_pm_ops, + .pm = pm_ptr(&va_macro_pm_ops), }, .probe = va_macro_probe, .remove = va_macro_remove, diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c index c989d82d1d3c..b261fa373e65 100644 --- a/sound/soc/codecs/lpass-wsa-macro.c +++ b/sound/soc/codecs/lpass-wsa-macro.c @@ -2900,7 +2900,7 @@ static void wsa_macro_remove(struct platform_device *pdev) clk_disable_unprepare(wsa->fsgen); } -static int __maybe_unused wsa_macro_runtime_suspend(struct device *dev) +static int wsa_macro_runtime_suspend(struct device *dev) { struct wsa_macro *wsa = dev_get_drvdata(dev); @@ -2914,7 +2914,7 @@ static int __maybe_unused wsa_macro_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused wsa_macro_runtime_resume(struct device *dev) +static int wsa_macro_runtime_resume(struct device *dev) { struct wsa_macro *wsa = dev_get_drvdata(dev); int ret; @@ -2950,7 +2950,7 @@ static int __maybe_unused wsa_macro_runtime_resume(struct device *dev) } static const struct dev_pm_ops wsa_macro_pm_ops = { - SET_RUNTIME_PM_OPS(wsa_macro_runtime_suspend, wsa_macro_runtime_resume, NULL) + RUNTIME_PM_OPS(wsa_macro_runtime_suspend, wsa_macro_runtime_resume, NULL) }; static const struct of_device_id wsa_macro_dt_match[] = { @@ -2977,7 +2977,7 @@ static struct platform_driver wsa_macro_driver = { .driver = { .name = "wsa_macro", .of_match_table = wsa_macro_dt_match, - .pm = &wsa_macro_pm_ops, + .pm = pm_ptr(&wsa_macro_pm_ops), }, .probe = wsa_macro_probe, .remove = wsa_macro_remove, From patchwork Thu Mar 13 17:40:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015608 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDA051C84A8 for ; Thu, 13 Mar 2025 17:42:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887772; cv=none; b=XUiNtQ9e8VMnS7GPjcBSWmthtJwY/WzfyvvIdRliQmQazGYLNxTqRE9NJogz9x55E5ff15nUfXp+CZlTm8wOBWdcPrP205m9xXzSAuKecqf/8gWWyPb6ZZk4HKODo5pnJhRmk38WrvAY0f1SthMk6dzgBOk8l4ZABnaGjiTHFlg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887772; c=relaxed/simple; bh=nkjrhWdIcjAbpoRx/xRmUR6lTgEhdDLGnaMRA82pIJk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HCRPG/QM0Spoi2wxXz8RFh86u4vXIHp2ChkgCiZ9Mzhjc+G0W3p4KpMmXpo5UkLUyShL6qcjX5VronzybEV/q0w3HH7Y+2fKYzgtOeQGS6KMJfkfQoTMjYfjy5EzoNADk8XJjEU79geWvqMeCSayxrJr+tnhU68NUz+dsqrVQcY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ILRN4irw; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QPRgrQV/; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ILRN4irw; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QPRgrQV/; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ILRN4irw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QPRgrQV/"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ILRN4irw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QPRgrQV/" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 525481F770; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y4yx4KoYtuvjiMrfWgedGhivMX+nli6sgLDHqddYd/E=; b=ILRN4irwEse2i80zuIOXmjjWyzqE3zaMKGXia7dca/UjvRBPQTsnaQpvLkmFHMbDQQKrgh coXi0ia4RsEh5t7MP7nOkwnCQoGpkvrwa0RSYYXWXh94SPgdXtgSCPKCm4KO4U1/kfnoRt JddGpyrMNbhogHMcxaWkMsw+XRELhxo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y4yx4KoYtuvjiMrfWgedGhivMX+nli6sgLDHqddYd/E=; b=QPRgrQV/jwBglc1PR15hlaKrjXOiFpySyYYb4ARiQo9MTpyCj+lpVLbLTScCbLJJXtUZKF WA6sI1rOaa4u5mBw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y4yx4KoYtuvjiMrfWgedGhivMX+nli6sgLDHqddYd/E=; b=ILRN4irwEse2i80zuIOXmjjWyzqE3zaMKGXia7dca/UjvRBPQTsnaQpvLkmFHMbDQQKrgh coXi0ia4RsEh5t7MP7nOkwnCQoGpkvrwa0RSYYXWXh94SPgdXtgSCPKCm4KO4U1/kfnoRt JddGpyrMNbhogHMcxaWkMsw+XRELhxo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y4yx4KoYtuvjiMrfWgedGhivMX+nli6sgLDHqddYd/E=; b=QPRgrQV/jwBglc1PR15hlaKrjXOiFpySyYYb4ARiQo9MTpyCj+lpVLbLTScCbLJJXtUZKF WA6sI1rOaa4u5mBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 327A0137BA; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qOjmCuUY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:57 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 21/89] ASoC: max98090: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:26 +0100 Message-ID: <20250313174139.29942-22-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM and CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/max98090.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index 790e2ae6dc18..22177c1ce160 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c @@ -2604,7 +2604,6 @@ static void max98090_i2c_remove(struct i2c_client *client) max98090_i2c_shutdown(client); } -#ifdef CONFIG_PM static int max98090_runtime_resume(struct device *dev) { struct max98090_priv *max98090 = dev_get_drvdata(dev); @@ -2626,9 +2625,7 @@ static int max98090_runtime_suspend(struct device *dev) return 0; } -#endif -#ifdef CONFIG_PM_SLEEP static int max98090_resume(struct device *dev) { struct max98090_priv *max98090 = dev_get_drvdata(dev); @@ -2645,12 +2642,10 @@ static int max98090_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops max98090_pm = { - SET_RUNTIME_PM_OPS(max98090_runtime_suspend, - max98090_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(NULL, max98090_resume) + RUNTIME_PM_OPS(max98090_runtime_suspend, max98090_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(NULL, max98090_resume) }; #ifdef CONFIG_OF @@ -2673,7 +2668,7 @@ MODULE_DEVICE_TABLE(acpi, max98090_acpi_match); static struct i2c_driver max98090_i2c_driver = { .driver = { .name = "max98090", - .pm = &max98090_pm, + .pm = pm_ptr(&max98090_pm), .of_match_table = of_match_ptr(max98090_of_match), .acpi_match_table = ACPI_PTR(max98090_acpi_match), }, From patchwork Thu Mar 13 17:40:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015615 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A0D21C84B6 for ; Thu, 13 Mar 2025 17:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887794; cv=none; b=TMNEGJsZWaNLdGVt/4VjGdp3tEPrSQkj+QeGOzUQKMrhYPS/9aw3qDarKcTY0yIc2eb5PEwQzGzhgmKq+lPgnK8UP+GGSFti9F87mIEhkQukLgbFIyB528hFyHG/bwMWU7ySKOO6g1u5KXMleDDaeVJPx3Li8oChMyM+WdrlAXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887794; c=relaxed/simple; bh=tGisyXuo9md3HsdCCpLqp4KSBvPPJn2PeU3tkdQrsGE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZPy5wHty00xALgnn5p41w3el3oEqNHrkABDqkPpAaHc7AESUCi7Z6JlXkXDioxYc9EDz4V/3CO8ZKNaGTD4FBAztQnCyeaJPB4ZXGSyzF706DlDxFjA9cHkGtvEua+V0u6oxGZTFZxa2PYeBP61ggwzjyBn+GtTl3QSrARYECfU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=y6NjjBYo; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RcToAFE4; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=y6NjjBYo; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RcToAFE4; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="y6NjjBYo"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RcToAFE4"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="y6NjjBYo"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RcToAFE4" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7F9C7211D4; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cEybxrpcEZ7VC+QuADUVQoCczz7ikE0G9aIlCPB78/E=; b=y6NjjBYouyrWPI7EM7t/wLZ4r9dQkuf6PdX0KK1IDsWKYHzXZR19IeoZSZi2KTwB1Ft4xS CfA6alkKACYzVGc4vv5q+8Y+bVLRsuW4yDmCiAOZHcvbwDF+FWxuPvzMSinFFJ69NHB3WK Dkc7y5q/EdsL6v0zs35T1hubvzQ0V9c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cEybxrpcEZ7VC+QuADUVQoCczz7ikE0G9aIlCPB78/E=; b=RcToAFE4bCt9ZlUeyLvIm7nNiaGvc1LfPodFwaxNgcSQKoeXzQr68meTSwfZ/BbFjJ0OfV r6LmS+dsGcvHI7Ag== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cEybxrpcEZ7VC+QuADUVQoCczz7ikE0G9aIlCPB78/E=; b=y6NjjBYouyrWPI7EM7t/wLZ4r9dQkuf6PdX0KK1IDsWKYHzXZR19IeoZSZi2KTwB1Ft4xS CfA6alkKACYzVGc4vv5q+8Y+bVLRsuW4yDmCiAOZHcvbwDF+FWxuPvzMSinFFJ69NHB3WK Dkc7y5q/EdsL6v0zs35T1hubvzQ0V9c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cEybxrpcEZ7VC+QuADUVQoCczz7ikE0G9aIlCPB78/E=; b=RcToAFE4bCt9ZlUeyLvIm7nNiaGvc1LfPodFwaxNgcSQKoeXzQr68meTSwfZ/BbFjJ0OfV r6LmS+dsGcvHI7Ag== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5A540139D2; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id SPtrFOUY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:57 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 22/89] ASoC: max98373: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:27 +0100 Message-ID: <20250313174139.29942-23-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM and CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/max98373-i2c.c | 6 ++---- sound/soc/codecs/max98373-sdw.c | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/max98373-i2c.c b/sound/soc/codecs/max98373-i2c.c index 1f7ff3dbcbbe..56c4ba1f3782 100644 --- a/sound/soc/codecs/max98373-i2c.c +++ b/sound/soc/codecs/max98373-i2c.c @@ -472,7 +472,6 @@ static struct snd_soc_dai_driver max98373_dai[] = { } }; -#ifdef CONFIG_PM_SLEEP static int max98373_suspend(struct device *dev) { struct max98373_priv *max98373 = dev_get_drvdata(dev); @@ -496,10 +495,9 @@ static int max98373_resume(struct device *dev) regcache_sync(max98373->regmap); return 0; } -#endif static const struct dev_pm_ops max98373_pm = { - SET_SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) + SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) }; static const struct regmap_config max98373_regmap = { @@ -605,7 +603,7 @@ static struct i2c_driver max98373_i2c_driver = { .name = "max98373", .of_match_table = of_match_ptr(max98373_of_match), .acpi_match_table = ACPI_PTR(max98373_acpi_match), - .pm = &max98373_pm, + .pm = pm_ptr(&max98373_pm), }, .probe = max98373_i2c_probe, .id_table = max98373_i2c_id, diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index 26860882fd91..6088278e6503 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -246,7 +246,7 @@ static const struct regmap_config max98373_sdw_regmap = { }; /* Power management functions and structure */ -static __maybe_unused int max98373_suspend(struct device *dev) +static int max98373_suspend(struct device *dev) { struct max98373_priv *max98373 = dev_get_drvdata(dev); int i; @@ -262,7 +262,7 @@ static __maybe_unused int max98373_suspend(struct device *dev) #define MAX98373_PROBE_TIMEOUT 5000 -static __maybe_unused int max98373_resume(struct device *dev) +static int max98373_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct max98373_priv *max98373 = dev_get_drvdata(dev); @@ -292,8 +292,8 @@ static __maybe_unused int max98373_resume(struct device *dev) } static const struct dev_pm_ops max98373_pm = { - SET_SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) - SET_RUNTIME_PM_OPS(max98373_suspend, max98373_resume, NULL) + SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) + RUNTIME_PM_OPS(max98373_suspend, max98373_resume, NULL) }; static int max98373_read_prop(struct sdw_slave *slave) @@ -874,7 +874,7 @@ static struct sdw_driver max98373_sdw_driver = { .name = "max98373", .of_match_table = of_match_ptr(max98373_of_match), .acpi_match_table = ACPI_PTR(max98373_acpi_match), - .pm = &max98373_pm, + .pm = pm_ptr(&max98373_pm), }, .probe = max98373_sdw_probe, .remove = max98373_sdw_remove, From patchwork Thu Mar 13 17:40:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015610 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A77E21607B4 for ; Thu, 13 Mar 2025 17:42:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887778; cv=none; b=thv6hV4oWjdz58/EAFHAuCV90rj4Ne110XQHTD44VoQhAQZmlzvYm55e1tDiTJA6+ajOEF0k7aUEnfEpg44+JCAeMUbLCKEzk7QVwh41fiNr1BnAn0ZvzpxwGrsj9ryIs2Rut1ud9TsoqtsHnY7Gg8bHpwKudOJTdrLKZuNIj5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887778; c=relaxed/simple; bh=ysCmnx/5FN7lATd5UDe50taoejiOQwRmwg65YEBDeKg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oyuv+pk2ck6jZS1F+cuF0R+A3JbTVATm47CUUv0V6ayOYrKgQKuA23JgZbljpSNZ6Q78Bu2Od9Uv9nk7qXHd90chvi66OnCtwzjTIIpmkCE5j39JLdeodBXHAW0louHoXggwqbC9N9LJYtEv0Y7zlGsDON+O1PhgogSoC4GM+AU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ftO68WSA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QK5/RYg+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ftO68WSA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QK5/RYg+; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ftO68WSA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QK5/RYg+"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ftO68WSA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QK5/RYg+" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A82A51F787; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Th6Lt7gQvv4PObPjiw4wch/j9nA9MlQoExJQrTmdOo=; b=ftO68WSAtVPna+bxjdhRW7TM7uBLB/CFdx/RR32PsCLZsKU5l5DdGQp7Z9lBScgHo1vvPG f2VDSaEjkrJPdh1Bc2IFsSEzE7UVwVPhSRwAUvYBvheZXS+VQLaM7u8U9IfyMdcCr9Jk1O g7ot8iUzRk4GI8CeA2s4vTcbKxBbviA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Th6Lt7gQvv4PObPjiw4wch/j9nA9MlQoExJQrTmdOo=; b=QK5/RYg+kOQraotSsTHUlkcqOQSROvlhwkO8qSBU21oV0bLtfI/k2OxUSE5hIvuQifTHF/ 7U6B92JPvm6SWaDg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ftO68WSA; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="QK5/RYg+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Th6Lt7gQvv4PObPjiw4wch/j9nA9MlQoExJQrTmdOo=; b=ftO68WSAtVPna+bxjdhRW7TM7uBLB/CFdx/RR32PsCLZsKU5l5DdGQp7Z9lBScgHo1vvPG f2VDSaEjkrJPdh1Bc2IFsSEzE7UVwVPhSRwAUvYBvheZXS+VQLaM7u8U9IfyMdcCr9Jk1O g7ot8iUzRk4GI8CeA2s4vTcbKxBbviA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Th6Lt7gQvv4PObPjiw4wch/j9nA9MlQoExJQrTmdOo=; b=QK5/RYg+kOQraotSsTHUlkcqOQSROvlhwkO8qSBU21oV0bLtfI/k2OxUSE5hIvuQifTHF/ 7U6B92JPvm6SWaDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 86CC1137BA; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id cHKZH+UY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:57 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 23/89] ASoC: max98390: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:28 +0100 Message-ID: <20250313174139.29942-24-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: A82A51F787 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/max98390.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs/max98390.c index 1bae253618fd..76296176f948 100644 --- a/sound/soc/codecs/max98390.c +++ b/sound/soc/codecs/max98390.c @@ -943,7 +943,6 @@ static int max98390_probe(struct snd_soc_component *component) return 0; } -#ifdef CONFIG_PM_SLEEP static int max98390_suspend(struct device *dev) { struct max98390_priv *max98390 = dev_get_drvdata(dev); @@ -967,10 +966,9 @@ static int max98390_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops max98390_pm = { - SET_SYSTEM_SLEEP_PM_OPS(max98390_suspend, max98390_resume) + SYSTEM_SLEEP_PM_OPS(max98390_suspend, max98390_resume) }; static const struct snd_soc_component_driver soc_codec_dev_max98390 = { @@ -1130,7 +1128,7 @@ static struct i2c_driver max98390_i2c_driver = { .name = "max98390", .of_match_table = of_match_ptr(max98390_of_match), .acpi_match_table = ACPI_PTR(max98390_acpi_match), - .pm = &max98390_pm, + .pm = pm_ptr(&max98390_pm), }, .probe = max98390_i2c_probe, .id_table = max98390_i2c_id, From patchwork Thu Mar 13 17:40:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015612 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B43E41B3F3D for ; Thu, 13 Mar 2025 17:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887784; cv=none; b=O3/VH1Idb9D5AK9mtAM4yfyD01gCdjS47JWNkYl4rF+0b7OX3BB/GkMBLTrw/pPPgo/zChaN3bK/HCJe/Vt5D+s1FlpifcXXegIpx0i4+BHRuaPLHfAEq6DnormK3i99zcCuERbAi8i2TErVByQQKgIKVQiQHXIiJcvQzPpGuOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887784; c=relaxed/simple; bh=NXUkwcyR+9NqNaVG2Y5Ceu3qHstSM2Y7EYyXgFr/9VY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H2Lh21L+/xzI8UjSfFZ4wcTIxkDHMBUzNXP2QSjFYF07uWCI6qgAGYrQgZcl37gKp3FvyFDzIIghv6uTOnXeLI1TpzTpLeuo+mTjb9ONHDjD2C7+BJK0G/BspCPV1Iefz1GgutaePzbnY8I3HVhsCOiNO+8JL/kChvXZBJHSEn4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=FgzPZRdr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=aRE4m+Nc; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=FgzPZRdr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=aRE4m+Nc; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="FgzPZRdr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="aRE4m+Nc"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="FgzPZRdr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="aRE4m+Nc" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CF3B31F789; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CnBfk7DzmeeyAbQ9o60ukPFsF+uIZz3IECf6dT7rY1k=; b=FgzPZRdryEwQFE65UiHTy1j4nQrPR4225pesM+aHXYY0jsoYPk5iYisAsbFhmCE/Ys023J zCQWS7UjT3ADkJTHMnPceyeSOg5yn6nnk7Eu8Dje9oeKCwx64f8XsOcTu++7SO7oGovvLO HTTb+3P1piKXjtWVLmZeACmf6gBAzTM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CnBfk7DzmeeyAbQ9o60ukPFsF+uIZz3IECf6dT7rY1k=; b=aRE4m+NcneHgyugCOSNCj2EiDuDQY6t0PELyjm3J7XRNlLqoLDq+93G5bphIMLqnp/51NY 9T7tr19rpciTaBBw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=FgzPZRdr; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=aRE4m+Nc DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CnBfk7DzmeeyAbQ9o60ukPFsF+uIZz3IECf6dT7rY1k=; b=FgzPZRdryEwQFE65UiHTy1j4nQrPR4225pesM+aHXYY0jsoYPk5iYisAsbFhmCE/Ys023J zCQWS7UjT3ADkJTHMnPceyeSOg5yn6nnk7Eu8Dje9oeKCwx64f8XsOcTu++7SO7oGovvLO HTTb+3P1piKXjtWVLmZeACmf6gBAzTM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887717; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CnBfk7DzmeeyAbQ9o60ukPFsF+uIZz3IECf6dT7rY1k=; b=aRE4m+NcneHgyugCOSNCj2EiDuDQY6t0PELyjm3J7XRNlLqoLDq+93G5bphIMLqnp/51NY 9T7tr19rpciTaBBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id AE0A1139D2; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id wCU3KeUY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:57 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 24/89] ASoC: max98396: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:29 +0100 Message-ID: <20250313174139.29942-25-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: CF3B31F789 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/max98396.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max98396.c b/sound/soc/codecs/max98396.c index e52bb2266fa1..c1888cd83dbc 100644 --- a/sound/soc/codecs/max98396.c +++ b/sound/soc/codecs/max98396.c @@ -1571,7 +1571,6 @@ static int max98396_probe(struct snd_soc_component *component) return 0; } -#ifdef CONFIG_PM_SLEEP static int max98396_suspend(struct device *dev) { struct max98396_priv *max98396 = dev_get_drvdata(dev); @@ -1616,10 +1615,9 @@ static int max98396_resume(struct device *dev) regcache_sync(max98396->regmap); return 0; } -#endif static const struct dev_pm_ops max98396_pm = { - SET_SYSTEM_SLEEP_PM_OPS(max98396_suspend, max98396_resume) + SYSTEM_SLEEP_PM_OPS(max98396_suspend, max98396_resume) }; static const struct snd_soc_component_driver soc_codec_dev_max98396 = { @@ -1904,7 +1902,7 @@ static struct i2c_driver max98396_i2c_driver = { .name = "max98396", .of_match_table = of_match_ptr(max98396_of_match), .acpi_match_table = ACPI_PTR(max98396_acpi_match), - .pm = &max98396_pm, + .pm = pm_ptr(&max98396_pm), }, .probe = max98396_i2c_probe, .id_table = max98396_i2c_id, From patchwork Thu Mar 13 17:40:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015617 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9CFA1607B4 for ; Thu, 13 Mar 2025 17:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887800; cv=none; b=dE9QGI1TqUJWW7F55MzWnnS9za/hSKIMy5LjrcsUKhWa+7sSg27AwrbSFnVJL4E81rrHPeEoZK2ZTD9E6VSAHIsgGE3mOREslb7vJ0ce1d6MCr4hXaOX74GmeYr6IPXahn3mSrxVQIpZO31PrjGzA6ZZTlATcc+wJSJnZOuo57c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887800; c=relaxed/simple; bh=lzP++nsp8ZDWtNHn2vlRy+P6/grNsjRL2WEosnj+yyQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vi/GzsC9Ws0q2sZw9AB/lrnvd7yJVyJgbjwSmHu7qdxxw5EwV9dPC1qnF/ln3L/M/Akmy4Ic1Kj8jMnj1nViebR4usPTWQVVnohJLt9b18V2DIv5YiSiipzLuOpmtpHAU/HihQ5sg2koHR8jtsPSxHHqI7Db2lhVo/otWIs1V98= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=poFRSJgC; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=bnynPVDO; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=poFRSJgC; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=bnynPVDO; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="poFRSJgC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="bnynPVDO"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="poFRSJgC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="bnynPVDO" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0B4DA211D5; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NtMMse/i/ff9Xok72/bw8Nv+RrnQUWQ2HL/S8mPNoqc=; b=poFRSJgCWN5CRm8MWPQRW37X0j65veVd3JGOzYXKlc1X8StaL1uKhBiFaE/aPkw2jXWO8h OvHvPUFOopHUylz3FqwJ/2a1RzirnEtCxqgo5K+eK2ivFMAwVsqDvEZfjP9gvDEZi+8Z+w NXKRXVqbcZWoNZzHVagfMTk7yhjEEpE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NtMMse/i/ff9Xok72/bw8Nv+RrnQUWQ2HL/S8mPNoqc=; b=bnynPVDOglH4zI1zfbaeJRxlkrCmAk6koS9Bre/7a38PAIykKA3S4hF/J2qqHS7sQxsFOS tjfRRo4E09Rcb8CQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=poFRSJgC; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=bnynPVDO DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NtMMse/i/ff9Xok72/bw8Nv+RrnQUWQ2HL/S8mPNoqc=; b=poFRSJgCWN5CRm8MWPQRW37X0j65veVd3JGOzYXKlc1X8StaL1uKhBiFaE/aPkw2jXWO8h OvHvPUFOopHUylz3FqwJ/2a1RzirnEtCxqgo5K+eK2ivFMAwVsqDvEZfjP9gvDEZi+8Z+w NXKRXVqbcZWoNZzHVagfMTk7yhjEEpE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NtMMse/i/ff9Xok72/bw8Nv+RrnQUWQ2HL/S8mPNoqc=; b=bnynPVDOglH4zI1zfbaeJRxlkrCmAk6koS9Bre/7a38PAIykKA3S4hF/J2qqHS7sQxsFOS tjfRRo4E09Rcb8CQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id D70EC137BA; Thu, 13 Mar 2025 17:41:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id AM/kMuUY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:57 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 25/89] ASoC: max98520: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:30 +0100 Message-ID: <20250313174139.29942-26-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 0B4DA211D5 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unsed attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/max98520.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max98520.c b/sound/soc/codecs/max98520.c index 479ded22672e..adf5a898c6df 100644 --- a/sound/soc/codecs/max98520.c +++ b/sound/soc/codecs/max98520.c @@ -621,7 +621,7 @@ static int max98520_probe(struct snd_soc_component *component) return 0; } -static int __maybe_unused max98520_suspend(struct device *dev) +static int max98520_suspend(struct device *dev) { struct max98520_priv *max98520 = dev_get_drvdata(dev); @@ -630,7 +630,7 @@ static int __maybe_unused max98520_suspend(struct device *dev) return 0; } -static int __maybe_unused max98520_resume(struct device *dev) +static int max98520_resume(struct device *dev) { struct max98520_priv *max98520 = dev_get_drvdata(dev); @@ -641,7 +641,7 @@ static int __maybe_unused max98520_resume(struct device *dev) } static const struct dev_pm_ops max98520_pm = { - SET_SYSTEM_SLEEP_PM_OPS(max98520_suspend, max98520_resume) + SYSTEM_SLEEP_PM_OPS(max98520_suspend, max98520_resume) }; static const struct snd_soc_component_driver soc_codec_dev_max98520 = { @@ -752,7 +752,7 @@ static struct i2c_driver max98520_i2c_driver = { .driver = { .name = "max98520", .of_match_table = of_match_ptr(max98520_of_match), - .pm = &max98520_pm, + .pm = pm_ptr(&max98520_pm), }, .probe = max98520_i2c_probe, .id_table = max98520_i2c_id, From patchwork Thu Mar 13 17:40:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015619 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0918A1607B4 for ; Thu, 13 Mar 2025 17:43:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887806; cv=none; b=QWvWbu4IO0Opx4J46WVSZNZdNcl9C92pFQla/Z3nIfNpSIFSZl1G0fc3g4c09ipf6UYxCCeQjEIYJGRkcbRBaynWA34rd324VEo5mykAbSZzvHqnfJwAO3bcrKJVH3ThmLOu1pZPhyi2aPU/OSMDJYN3nHKwsa/B3QXLFCtwaYk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887806; c=relaxed/simple; bh=xxMUzA9yvOg6ZSIwEnWnzcrnnvGglF5AoxyD/lpq9Jk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dxqkzPbc0poQqUs7ggz1Nso5qkAiW7ZiUznX3OwQzdr5PWykOyyjdt8vqptq8q0che02aU+69ov4xmkpdnoQhTXHcQyoEbxg3hRkmcKbpubiSNTBJ/t/yoIv5wCkBTUUv/IYx3jeyYiZGb9UIUdUYyHMF0dGo/3P4kkIH227xX4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=106XobYP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=pm24Eq0w; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=106XobYP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=pm24Eq0w; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="106XobYP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="pm24Eq0w"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="106XobYP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="pm24Eq0w" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3441A211D6; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uFTpX2RI+ysGNORrqHPtmZLML+elMpMWUmAOjAUQT9w=; b=106XobYP/KhS+W+HcF2fb79Yh8BFHmIYwyNWm1zfTyK9TnAwwohEK92zQ7nSB2RonowFNa pRh9ZXsS+ZsxriRMMe6Uwxa0YKed0gqCmoUqFz8bVJGZ32psixTm+uyXnPYe+0in/4XWB/ eIDPeh/Kd1td8Q/giIvMFNlfFfXrCmA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uFTpX2RI+ysGNORrqHPtmZLML+elMpMWUmAOjAUQT9w=; b=pm24Eq0wFCxI1ygymlbklUxVLDWwA9Vo23T8Bhop63XN3jtC6Ch2IZmbw07zXXJZurWQQL tY46ts+jFU8UU3Aw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uFTpX2RI+ysGNORrqHPtmZLML+elMpMWUmAOjAUQT9w=; b=106XobYP/KhS+W+HcF2fb79Yh8BFHmIYwyNWm1zfTyK9TnAwwohEK92zQ7nSB2RonowFNa pRh9ZXsS+ZsxriRMMe6Uwxa0YKed0gqCmoUqFz8bVJGZ32psixTm+uyXnPYe+0in/4XWB/ eIDPeh/Kd1td8Q/giIvMFNlfFfXrCmA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uFTpX2RI+ysGNORrqHPtmZLML+elMpMWUmAOjAUQT9w=; b=pm24Eq0wFCxI1ygymlbklUxVLDWwA9Vo23T8Bhop63XN3jtC6Ch2IZmbw07zXXJZurWQQL tY46ts+jFU8UU3Aw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 14DF9139D2; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id CHOkA+YY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:58 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 26/89] ASoC: max9860: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:31 +0100 Message-ID: <20250313174139.29942-27-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/max9860.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max9860.c b/sound/soc/codecs/max9860.c index 4015ed2c47ec..716d16daf7d7 100644 --- a/sound/soc/codecs/max9860.c +++ b/sound/soc/codecs/max9860.c @@ -539,7 +539,6 @@ static const struct snd_soc_component_driver max9860_component_driver = { .endianness = 1, }; -#ifdef CONFIG_PM static int max9860_suspend(struct device *dev) { struct max9860_priv *max9860 = dev_get_drvdata(dev); @@ -584,10 +583,9 @@ static int max9860_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops max9860_pm_ops = { - SET_RUNTIME_PM_OPS(max9860_suspend, max9860_resume, NULL) + RUNTIME_PM_OPS(max9860_suspend, max9860_resume, NULL) }; static int max9860_probe(struct i2c_client *i2c) @@ -729,7 +727,7 @@ static struct i2c_driver max9860_i2c_driver = { .driver = { .name = "max9860", .of_match_table = max9860_of_match, - .pm = &max9860_pm_ops, + .pm = pm_ptr(&max9860_pm_ops), }, }; From patchwork Thu Mar 13 17:40:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015614 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C76D1B3F3D for ; Thu, 13 Mar 2025 17:43:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887791; cv=none; b=bA4BlUuJrpI0OOPvAwc6RFlLhnaarh98AVwZBD90fpQ/WkUz1+nobOvmcquPBHQ0YPenyt0mZEsk4b8yEVs//34KBD/DMT4pT7TAR4ekJ/0D1H+v91aTPkajUtLeEea4r9adLkZDn12f/LJve7Jr9X/ReDxV9Buyxih7rzE80d8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887791; c=relaxed/simple; bh=sEO+7a7DAsS+yA4j4gaoFTfCFQQ5UitbJZEKQYUQDgw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FI2jiAwFKAB5A7u0UyaTjrGsOKblU4NJJUX5DKlmjpFsFdhPvHLDJcNtF+ZUpRtQWkAynsLKg8B2nIyaJSIfOTR9sgRhEue+UdL16EWVkcHyUWif38JhZprKGtjmPk+wXeujm67/YIA2eGjIhd2t9We1WEhImpfyzJYeuEqtlBY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OUzOR66Q; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eFxe1S4Q; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OUzOR66Q; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=eFxe1S4Q; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OUzOR66Q"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eFxe1S4Q"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OUzOR66Q"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="eFxe1S4Q" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 59E061F792; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sUWEiDpUJwm5Kuz8oj15DMbP4y4js/IRWB5npvPf0Zo=; b=OUzOR66Qw5Dj1lNjzxmOygsDEsUX8PD9k6rWtalHjIp4QAmZTtqK62LowM0P6AbioP/NAd 3IYxOzW1sjrh3tgrMb2u7TS2G4lU6s5b5MmCFcZyAgr/yI9KRRE4y/c1j08vWeNbc+YT3p Ca6+LAF+HYIpeatgr30AXVk+wM5ZZLU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sUWEiDpUJwm5Kuz8oj15DMbP4y4js/IRWB5npvPf0Zo=; b=eFxe1S4QbLF9SjUVRZgcyQjc2ub8079/rtTqgp7gehlvYvH2wlnLtNH7+bwYa2/aJ0riNt UfPToJmjKUJ0gjCg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sUWEiDpUJwm5Kuz8oj15DMbP4y4js/IRWB5npvPf0Zo=; b=OUzOR66Qw5Dj1lNjzxmOygsDEsUX8PD9k6rWtalHjIp4QAmZTtqK62LowM0P6AbioP/NAd 3IYxOzW1sjrh3tgrMb2u7TS2G4lU6s5b5MmCFcZyAgr/yI9KRRE4y/c1j08vWeNbc+YT3p Ca6+LAF+HYIpeatgr30AXVk+wM5ZZLU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sUWEiDpUJwm5Kuz8oj15DMbP4y4js/IRWB5npvPf0Zo=; b=eFxe1S4QbLF9SjUVRZgcyQjc2ub8079/rtTqgp7gehlvYvH2wlnLtNH7+bwYa2/aJ0riNt UfPToJmjKUJ0gjCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3AC5D137BA; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QMcTDeYY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:58 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 27/89] ASoC: max98927: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:32 +0100 Message-ID: <20250313174139.29942-28-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/max98927.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c index 747aa6f1d54f..55cc18451a2d 100644 --- a/sound/soc/codecs/max98927.c +++ b/sound/soc/codecs/max98927.c @@ -731,7 +731,6 @@ static int max98927_probe(struct snd_soc_component *component) return 0; } -#ifdef CONFIG_PM_SLEEP static int max98927_suspend(struct device *dev) { struct max98927_priv *max98927 = dev_get_drvdata(dev); @@ -750,10 +749,9 @@ static int max98927_resume(struct device *dev) regcache_sync(max98927->regmap); return 0; } -#endif static const struct dev_pm_ops max98927_pm = { - SET_SYSTEM_SLEEP_PM_OPS(max98927_suspend, max98927_resume) + SYSTEM_SLEEP_PM_OPS(max98927_suspend, max98927_resume) }; static const struct snd_soc_component_driver soc_component_dev_max98927 = { @@ -902,7 +900,7 @@ static struct i2c_driver max98927_i2c_driver = { .name = "max98927", .of_match_table = of_match_ptr(max98927_of_match), .acpi_match_table = ACPI_PTR(max98927_acpi_match), - .pm = &max98927_pm, + .pm = pm_ptr(&max98927_pm), }, .probe = max98927_i2c_probe, .remove = max98927_i2c_remove, From patchwork Thu Mar 13 17:40:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015616 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 173DA18A6A5 for ; Thu, 13 Mar 2025 17:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887797; cv=none; b=kRpY7Bid9Pv6ySwzWt1tJtXYL0OsXzYQAUVKYI8RPajshkI4S6sdB7UiWXepYjw4qunwlSQ1IWlpLocAX0Dl0CefO0128jdoheVTtC/tpGnjXjRP8cQiJLfGE3cHTEL6q03Ptizgun7yRA9/GmgPt5aTA6uwXmZM+vzUE6z8fg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887797; c=relaxed/simple; bh=qK6wU1DxCbzVJNJfQS1yaD9J0LuKLt2h8LpCUKopc+I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=giYmQtJudaDKDGlhnKv91SZksv/q2dhV39z1RI65xL8Bb5YpyJqTTWnqubih6ObczDailYuypQ0Q4ju7GagX1h2TpRxpzrOITjV0lQANU+9nCi/A6wzJuX6BnJuZ8U8loIT9+1TDo8dPTUHg8iDdUsEJZoqAqzQd7V/ahM4nLWY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=b+Rksxxj; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=nBodAAAM; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=b+Rksxxj; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=nBodAAAM; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="b+Rksxxj"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="nBodAAAM"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="b+Rksxxj"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="nBodAAAM" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9DD5E1F791; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AzDN+xeuwJbhSEjP2b4OpxrJyBEIkFduYYw2mxoPT4c=; b=b+Rksxxj1U0GjBn0Dij+OEeX9TPPveRN8sW/zodH0KPozt/F3SUlXHgsFm5lLbLIwNY50L Fx6bepG6cu6qWDovJXyge1q0XktLFaZk4Hv6IEqTsok1W1n0sHhn7rPxgj3vKx9oOvgK3o wHH5j/tGpPG/qrAogt/Npdxjusoa7xA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AzDN+xeuwJbhSEjP2b4OpxrJyBEIkFduYYw2mxoPT4c=; b=nBodAAAMHNxBCZ/NKiHkytrUm+9qm7lWh0a+F46HjfI3mbxvw2aYUi5ffmW5B+YqUc7XT2 KZxxxd/ttL2jicDw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=b+Rksxxj; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=nBodAAAM DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AzDN+xeuwJbhSEjP2b4OpxrJyBEIkFduYYw2mxoPT4c=; b=b+Rksxxj1U0GjBn0Dij+OEeX9TPPveRN8sW/zodH0KPozt/F3SUlXHgsFm5lLbLIwNY50L Fx6bepG6cu6qWDovJXyge1q0XktLFaZk4Hv6IEqTsok1W1n0sHhn7rPxgj3vKx9oOvgK3o wHH5j/tGpPG/qrAogt/Npdxjusoa7xA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AzDN+xeuwJbhSEjP2b4OpxrJyBEIkFduYYw2mxoPT4c=; b=nBodAAAMHNxBCZ/NKiHkytrUm+9qm7lWh0a+F46HjfI3mbxvw2aYUi5ffmW5B+YqUc7XT2 KZxxxd/ttL2jicDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 627DF139D2; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id gDeMFuYY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:58 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 28/89] ASoC: mt6660: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:33 +0100 Message-ID: <20250313174139.29942-29-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 9DD5E1F791 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/mt6660.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/mt6660.c b/sound/soc/codecs/mt6660.c index 39a57f643d81..d16bccebae52 100644 --- a/sound/soc/codecs/mt6660.c +++ b/sound/soc/codecs/mt6660.c @@ -529,7 +529,7 @@ static void mt6660_i2c_remove(struct i2c_client *client) mutex_destroy(&chip->io_lock); } -static int __maybe_unused mt6660_i2c_runtime_suspend(struct device *dev) +static int mt6660_i2c_runtime_suspend(struct device *dev) { struct mt6660_chip *chip = dev_get_drvdata(dev); @@ -538,7 +538,7 @@ static int __maybe_unused mt6660_i2c_runtime_suspend(struct device *dev) MT6660_REG_SYSTEM_CTRL, 0x01, 0x01); } -static int __maybe_unused mt6660_i2c_runtime_resume(struct device *dev) +static int mt6660_i2c_runtime_resume(struct device *dev) { struct mt6660_chip *chip = dev_get_drvdata(dev); @@ -548,8 +548,7 @@ static int __maybe_unused mt6660_i2c_runtime_resume(struct device *dev) } static const struct dev_pm_ops mt6660_dev_pm_ops = { - SET_RUNTIME_PM_OPS(mt6660_i2c_runtime_suspend, - mt6660_i2c_runtime_resume, NULL) + RUNTIME_PM_OPS(mt6660_i2c_runtime_suspend, mt6660_i2c_runtime_resume, NULL) }; static const struct of_device_id __maybe_unused mt6660_of_id[] = { @@ -568,7 +567,7 @@ static struct i2c_driver mt6660_i2c_driver = { .driver = { .name = "mt6660", .of_match_table = of_match_ptr(mt6660_of_id), - .pm = &mt6660_dev_pm_ops, + .pm = pm_ptr(&mt6660_dev_pm_ops), }, .probe = mt6660_i2c_probe, .remove = mt6660_i2c_remove, From patchwork Thu Mar 13 17:40:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015618 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 894AB1B3F3D for ; Thu, 13 Mar 2025 17:43:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887803; cv=none; b=o9K/9nHtRGNNA6iN4yY6Em0K+67BuWC4natQp5xjR+qr33Y2y0xxzI7padMuHhpmVfo8mEfsmruwXJFzh0Yy7TUnwHJCLRR4O7MOtPpdTA90J6CsqbccDcsHoCZ7qeS1RVvGWEeeWvVOzTFNJZ4idmFWezrl0NY35u2XrVW8i2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887803; c=relaxed/simple; bh=RE0/Z0kxqGWEbuWg9s+6WtoGV/CtrquKriTqc4IIbC4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HmwOEyZnNbjJryPXldSqPTLLbz+g1MhvGzSNMQVuTcz77vAifpLrIBmc0W+CDW+HmMBgw88/9P+3Rl/P9TIsvGI6FUsVI70PGil3UrwD7VfMBqYGrHeWW/Bnvhdt5Lu1yB626tHJCwhNK2lprwh31VVW2fH54wQPjBvCwZlXcgw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=W0qK0lPc; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=kpebkBdD; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=W0qK0lPc; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=kpebkBdD; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="W0qK0lPc"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="kpebkBdD"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="W0qK0lPc"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="kpebkBdD" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C99411F796; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9eEEc6eY8Dw7HlngDDgvADPGCT2Ksurw9wwVJlN8VaQ=; b=W0qK0lPcH0u3z0bpteH50Bp6/QxZD4D7I3r+Bcrw9IVHoHCm9fGHraEKvyGUvrl7x9lRgm YTYAqWAWGq6RpB1oT8VxNzOWh1POgMxBF7lUOfMG0pr83B3CDVthjQPht8NGVDbyKey8it rnDa8IChedKXfwX8exL7kw27h5v+HJ0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9eEEc6eY8Dw7HlngDDgvADPGCT2Ksurw9wwVJlN8VaQ=; b=kpebkBdDbaYpJmet3kr98N4Up6+rACI7qtPAshXuJFJq5oAM0hkOY73c9NR9NcvlNKjcxf rLej2WBOnE69oLAA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9eEEc6eY8Dw7HlngDDgvADPGCT2Ksurw9wwVJlN8VaQ=; b=W0qK0lPcH0u3z0bpteH50Bp6/QxZD4D7I3r+Bcrw9IVHoHCm9fGHraEKvyGUvrl7x9lRgm YTYAqWAWGq6RpB1oT8VxNzOWh1POgMxBF7lUOfMG0pr83B3CDVthjQPht8NGVDbyKey8it rnDa8IChedKXfwX8exL7kw27h5v+HJ0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887718; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9eEEc6eY8Dw7HlngDDgvADPGCT2Ksurw9wwVJlN8VaQ=; b=kpebkBdDbaYpJmet3kr98N4Up6+rACI7qtPAshXuJFJq5oAM0hkOY73c9NR9NcvlNKjcxf rLej2WBOnE69oLAA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 98034137BA; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6A3NI+YY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:58 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Shenghao Ding , Kevin Lu , Baojun Xu Subject: [PATCH 29/89] ASoC: pcm512x: Convert to EXPORT_GPL_DEV_PM_OPS() Date: Thu, 13 Mar 2025 18:40:34 +0100 Message-ID: <20250313174139.29942-30-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer EXPORT_GPL_DEV_PM_OPS() macro together with pm_ptr(). This allows us to drop superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Shenghao Ding Cc: Kevin Lu Cc: Baojun Xu Signed-off-by: Takashi Iwai --- sound/soc/codecs/pcm512x-i2c.c | 2 +- sound/soc/codecs/pcm512x-spi.c | 2 +- sound/soc/codecs/pcm512x.c | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/pcm512x-i2c.c b/sound/soc/codecs/pcm512x-i2c.c index 92bcf5179779..a1d849b0c50f 100644 --- a/sound/soc/codecs/pcm512x-i2c.c +++ b/sound/soc/codecs/pcm512x-i2c.c @@ -79,7 +79,7 @@ static struct i2c_driver pcm512x_i2c_driver = { .name = "pcm512x", .of_match_table = of_match_ptr(pcm512x_of_match), .acpi_match_table = ACPI_PTR(pcm512x_acpi_match), - .pm = &pcm512x_pm_ops, + .pm = pm_ptr(&pcm512x_pm_ops), }, }; diff --git a/sound/soc/codecs/pcm512x-spi.c b/sound/soc/codecs/pcm512x-spi.c index 6629b862f47d..92f7f78a4e20 100644 --- a/sound/soc/codecs/pcm512x-spi.c +++ b/sound/soc/codecs/pcm512x-spi.c @@ -58,7 +58,7 @@ static struct spi_driver pcm512x_spi_driver = { .driver = { .name = "pcm512x", .of_match_table = pcm512x_of_match, - .pm = &pcm512x_pm_ops, + .pm = pm_ptr(&pcm512x_pm_ops), }, }; diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c index aa8edf87b743..007dfc0fa224 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -1725,7 +1725,6 @@ void pcm512x_remove(struct device *dev) } EXPORT_SYMBOL_GPL(pcm512x_remove); -#ifdef CONFIG_PM static int pcm512x_suspend(struct device *dev) { struct pcm512x_priv *pcm512x = dev_get_drvdata(dev); @@ -1787,12 +1786,10 @@ static int pcm512x_resume(struct device *dev) return 0; } -#endif -const struct dev_pm_ops pcm512x_pm_ops = { - SET_RUNTIME_PM_OPS(pcm512x_suspend, pcm512x_resume, NULL) +EXPORT_GPL_DEV_PM_OPS(pcm512x_pm_ops) = { + RUNTIME_PM_OPS(pcm512x_suspend, pcm512x_resume, NULL) }; -EXPORT_SYMBOL_GPL(pcm512x_pm_ops); MODULE_DESCRIPTION("ASoC PCM512x codec driver"); MODULE_AUTHOR("Mark Brown "); From patchwork Thu Mar 13 17:40:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015620 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DD8F18F2FC for ; Thu, 13 Mar 2025 17:43:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887809; cv=none; b=qFp9Wu7D2G1RJc3bZ/moK8GUQ3h4qkqz08y1s6Roc23BfToSMDl9Mjbb9OwJYc7YU+KJbIGB52X2P7WrciFB227b1+p83JuA6CiqXEqL2+zXWwDfbnz+S97NQa5OEOkcwGDYLniBbuT5OxaGJePw4UHI0bXhfDGLBrMZigOpr80= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887809; c=relaxed/simple; bh=9oRT/5c+mglXcnGUFXrbh4lRlA9FgVOoR0QP9lfCBE8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DvAGE60+RADKdsEKPKqtXsjdFta9eEbUos+Lzuvq0rueUyqankeMFxj6mOUqBjSpW3PQJDBLgh0zkytXQ1RJkYlkmpvt3in9a9tMI5OtWBHuNR9PcckG8wsdzDDbe63KfUiF0i0Tddua1B1t2cSOZOYxty6Z/HgVmB2xOLo6pZk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UTf7B/wX; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=MMl4f4y8; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UTf7B/wX; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=MMl4f4y8; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UTf7B/wX"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="MMl4f4y8"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UTf7B/wX"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="MMl4f4y8" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 07DE61F79C; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ylypWt+uKlddQJ4kKhRFmpGQZrDY3DHhAoDX9thJI6U=; b=UTf7B/wXvc3BIEh7+WFuyyZCqRPcoSGdc8zeQGRViVanIPk3jSMSpoZy16Hu6Bjqozqs5G CdWRKPUc+UALLqC7sJLLGm6xPbH8dWOBO3rwQ5vYoR8hM1KgSKachSRQtMPqLBjTZ7/0N/ SHoTUQwb/ugzGi6kkOWJ6QQXnxBXZp4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ylypWt+uKlddQJ4kKhRFmpGQZrDY3DHhAoDX9thJI6U=; b=MMl4f4y8swEhRCoW5NWBovg0Zm8OzzzANj9jkeoE12pyNJK1QQgPlGzHfsGag2cpDmPu+k qOxDi8iI3UR0fDDg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ylypWt+uKlddQJ4kKhRFmpGQZrDY3DHhAoDX9thJI6U=; b=UTf7B/wXvc3BIEh7+WFuyyZCqRPcoSGdc8zeQGRViVanIPk3jSMSpoZy16Hu6Bjqozqs5G CdWRKPUc+UALLqC7sJLLGm6xPbH8dWOBO3rwQ5vYoR8hM1KgSKachSRQtMPqLBjTZ7/0N/ SHoTUQwb/ugzGi6kkOWJ6QQXnxBXZp4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ylypWt+uKlddQJ4kKhRFmpGQZrDY3DHhAoDX9thJI6U=; b=MMl4f4y8swEhRCoW5NWBovg0Zm8OzzzANj9jkeoE12pyNJK1QQgPlGzHfsGag2cpDmPu+k qOxDi8iI3UR0fDDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id D1313139D2; Thu, 13 Mar 2025 17:41:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id CPyIMeYY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:58 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 30/89] ASoC: rt1017-sdca-sdw: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:35 +0100 Message-ID: <20250313174139.29942-31-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt1017-sdca-sdw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1017-sdca-sdw.c b/sound/soc/codecs/rt1017-sdca-sdw.c index 7c8103a0d562..88fc23a4999f 100644 --- a/sound/soc/codecs/rt1017-sdca-sdw.c +++ b/sound/soc/codecs/rt1017-sdca-sdw.c @@ -758,7 +758,7 @@ static const struct sdw_device_id rt1017_sdca_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt1017_sdca_id); -static int __maybe_unused rt1017_sdca_dev_suspend(struct device *dev) +static int rt1017_sdca_dev_suspend(struct device *dev) { struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(dev); @@ -772,7 +772,7 @@ static int __maybe_unused rt1017_sdca_dev_suspend(struct device *dev) #define RT1017_PROBE_TIMEOUT 5000 -static int __maybe_unused rt1017_sdca_dev_resume(struct device *dev) +static int rt1017_sdca_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt1017_sdca_priv *rt1017 = dev_get_drvdata(dev); @@ -802,14 +802,14 @@ static int __maybe_unused rt1017_sdca_dev_resume(struct device *dev) } static const struct dev_pm_ops rt1017_sdca_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt1017_sdca_dev_suspend, rt1017_sdca_dev_resume) - SET_RUNTIME_PM_OPS(rt1017_sdca_dev_suspend, rt1017_sdca_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt1017_sdca_dev_suspend, rt1017_sdca_dev_resume) + RUNTIME_PM_OPS(rt1017_sdca_dev_suspend, rt1017_sdca_dev_resume, NULL) }; static struct sdw_driver rt1017_sdca_sdw_driver = { .driver = { .name = "rt1017-sdca", - .pm = &rt1017_sdca_pm, + .pm = pm_ptr(&rt1017_sdca_pm), }, .probe = rt1017_sdca_sdw_probe, .remove = rt1017_sdca_sdw_remove, From patchwork Thu Mar 13 17:40:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015621 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6867618F2FC for ; Thu, 13 Mar 2025 17:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887812; cv=none; b=o+q50WlEUqH0/t3vrWjGclPhtUixdf0KY1vDKDCet/YS/opwdA+KrAx0AbASPPa69I5NNwHZhtXYhkk8CV2BVnFDbMNU6miQwcNNJJtxyq+NuH7uyLlLZ5rEJufSbhXDGvhXkAqHui3BBNcGdHt1OWrQCfMwHL4iAx0yFdWdIQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887812; c=relaxed/simple; bh=elcF+nURC9j7Q0fZ035ohcS9x+had2Q7V54y4Xgz214=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T90iaxhMmy31WKl7KqiU2h6F0g3NcDDUvkt5Zg1lbldozeJixwdlIz7W/lwGB74hbw+JLFn/tdt4JBWsnUE+hEIyBOf05ONqp/P8sHtB2bKP15f6kx76O0YeqlABlt0E6h4TFpJ1Cd2Y0BUpQ1bZZsGMrz+d6eMq6JratHR7W5I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=V0wr/1BQ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=A4nTPKVA; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=V0wr/1BQ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=A4nTPKVA; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="V0wr/1BQ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="A4nTPKVA"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="V0wr/1BQ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="A4nTPKVA" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 36C09211D7; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TnExaFcOEzbKE6DLesubzpyFty/ljnMK/cVKeSMJRoA=; b=V0wr/1BQOkBBb31QKpsLRDANrfEZ6sfah9nQamDt0+4iWKmThua8UjAyZ3Eawi43i/mmek avUv+87cwsX31DWAI4VyZqyuFy0qfBA+VpkcF8RPQjNkR9GrV3aXELd0Yf8t/Vk21Yr4lb eQkykJP/9GW89+e28UvagK1YYruSs6E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TnExaFcOEzbKE6DLesubzpyFty/ljnMK/cVKeSMJRoA=; b=A4nTPKVA+ONiFPLNjt/eRZ1E5ECgIuLMXf0KaipCDPvwDK4EM8j6+/rJ1mX7wxIsM86SN/ 0jbJ09UFFQqG7QAQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TnExaFcOEzbKE6DLesubzpyFty/ljnMK/cVKeSMJRoA=; b=V0wr/1BQOkBBb31QKpsLRDANrfEZ6sfah9nQamDt0+4iWKmThua8UjAyZ3Eawi43i/mmek avUv+87cwsX31DWAI4VyZqyuFy0qfBA+VpkcF8RPQjNkR9GrV3aXELd0Yf8t/Vk21Yr4lb eQkykJP/9GW89+e28UvagK1YYruSs6E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TnExaFcOEzbKE6DLesubzpyFty/ljnMK/cVKeSMJRoA=; b=A4nTPKVA+ONiFPLNjt/eRZ1E5ECgIuLMXf0KaipCDPvwDK4EM8j6+/rJ1mX7wxIsM86SN/ 0jbJ09UFFQqG7QAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0E3F6137BA; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6O8gAucY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:59 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 31/89] ASoC: rt1308-sdw: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:36 +0100 Message-ID: <20250313174139.29942-32-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt1308-sdw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c index 563df483a466..ea708068f0e8 100644 --- a/sound/soc/codecs/rt1308-sdw.c +++ b/sound/soc/codecs/rt1308-sdw.c @@ -753,7 +753,7 @@ static const struct sdw_device_id rt1308_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt1308_id); -static int __maybe_unused rt1308_dev_suspend(struct device *dev) +static int rt1308_dev_suspend(struct device *dev) { struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev); @@ -767,7 +767,7 @@ static int __maybe_unused rt1308_dev_suspend(struct device *dev) #define RT1308_PROBE_TIMEOUT 5000 -static int __maybe_unused rt1308_dev_resume(struct device *dev) +static int rt1308_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev); @@ -797,14 +797,14 @@ static int __maybe_unused rt1308_dev_resume(struct device *dev) } static const struct dev_pm_ops rt1308_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt1308_dev_suspend, rt1308_dev_resume) - SET_RUNTIME_PM_OPS(rt1308_dev_suspend, rt1308_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt1308_dev_suspend, rt1308_dev_resume) + RUNTIME_PM_OPS(rt1308_dev_suspend, rt1308_dev_resume, NULL) }; static struct sdw_driver rt1308_sdw_driver = { .driver = { .name = "rt1308", - .pm = &rt1308_pm, + .pm = pm_ptr(&rt1308_pm), }, .probe = rt1308_sdw_probe, .remove = rt1308_sdw_remove, From patchwork Thu Mar 13 17:40:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015623 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A02E1B3F3D for ; Thu, 13 Mar 2025 17:43:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887819; cv=none; b=qut0XfTUN7MtfdQptsn9lyoqjO6QVZsF1h8ZaHS0qLLlzGg2ZtSVZPBWbH/WF8PlBMlIOqVWRw6Nb3H2riYGo3dmeXoSG8QRQ3MiG5klkNRYLDNQnKJznkRHf0KJaFQIyv4ZhmKrUf0oDmPkUQcGwQKqcSE9wnYGRP65qDyMWcU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887819; c=relaxed/simple; bh=85keOgujEBv92/5CRX/rEBG7hTMsHaDiHAFvMR/VI7s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pN5ZN/L0+7tqAynBKqQhURGBc7tmspLVxlUQqNeNF0pgpX0qWosbmSOXcLN6rBOvqDCm+OQ0CtfIywLELoSV+xGXsoFiqktUzdKHnKIYEsBr3vqdiSyT53uak7BsD9VHPScrl8atEmdq/Yr4u2EUMDxJQFr6eaxDeFEuC8c9UyA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=1OP1wHHV; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=9X1mYwRq; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=1OP1wHHV; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=9X1mYwRq; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="1OP1wHHV"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="9X1mYwRq"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="1OP1wHHV"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="9X1mYwRq" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 70D62211DD; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U/PUlQ7Z/vG6UH0nMkXibl9zs/O5DgckhE90p5OAbeI=; b=1OP1wHHVMULmY8mPTX6WET6YYpcTw4J854RV6e+kXabfWnBQ8RqBDcqtCCnK8Aatmrb/gt 2PTbGsXP8p1EOkbQdrm3hyXar+g6X2SmPKQTDbgS0nytQTYpdL1AABX5/xvNGWQMO1GZbT qJEyfVnya7sBArZBy/wDdg09A7Dwctg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U/PUlQ7Z/vG6UH0nMkXibl9zs/O5DgckhE90p5OAbeI=; b=9X1mYwRq8p+2ql9/s4EqIbrcgorhtcfhddBZhmLU7394R4ZZFnAnvXyN/pqaeCyxljpFsL MZWjutyNS+enA3Aw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U/PUlQ7Z/vG6UH0nMkXibl9zs/O5DgckhE90p5OAbeI=; b=1OP1wHHVMULmY8mPTX6WET6YYpcTw4J854RV6e+kXabfWnBQ8RqBDcqtCCnK8Aatmrb/gt 2PTbGsXP8p1EOkbQdrm3hyXar+g6X2SmPKQTDbgS0nytQTYpdL1AABX5/xvNGWQMO1GZbT qJEyfVnya7sBArZBy/wDdg09A7Dwctg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U/PUlQ7Z/vG6UH0nMkXibl9zs/O5DgckhE90p5OAbeI=; b=9X1mYwRq8p+2ql9/s4EqIbrcgorhtcfhddBZhmLU7394R4ZZFnAnvXyN/pqaeCyxljpFsL MZWjutyNS+enA3Aw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3FB13139D2; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4KyXDecY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:59 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 32/89] ASoC: rt1316-sdw: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:37 +0100 Message-ID: <20250313174139.29942-33-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt1316-sdw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1316-sdw.c b/sound/soc/codecs/rt1316-sdw.c index 22f1ed4e03f1..960b6c4f5a66 100644 --- a/sound/soc/codecs/rt1316-sdw.c +++ b/sound/soc/codecs/rt1316-sdw.c @@ -730,7 +730,7 @@ static const struct sdw_device_id rt1316_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt1316_id); -static int __maybe_unused rt1316_dev_suspend(struct device *dev) +static int rt1316_dev_suspend(struct device *dev) { struct rt1316_sdw_priv *rt1316 = dev_get_drvdata(dev); @@ -744,7 +744,7 @@ static int __maybe_unused rt1316_dev_suspend(struct device *dev) #define RT1316_PROBE_TIMEOUT 5000 -static int __maybe_unused rt1316_dev_resume(struct device *dev) +static int rt1316_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt1316_sdw_priv *rt1316 = dev_get_drvdata(dev); @@ -774,14 +774,14 @@ static int __maybe_unused rt1316_dev_resume(struct device *dev) } static const struct dev_pm_ops rt1316_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt1316_dev_suspend, rt1316_dev_resume) - SET_RUNTIME_PM_OPS(rt1316_dev_suspend, rt1316_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt1316_dev_suspend, rt1316_dev_resume) + RUNTIME_PM_OPS(rt1316_dev_suspend, rt1316_dev_resume, NULL) }; static struct sdw_driver rt1316_sdw_driver = { .driver = { .name = "rt1316-sdca", - .pm = &rt1316_pm, + .pm = pm_ptr(&rt1316_pm), }, .probe = rt1316_sdw_probe, .remove = rt1316_sdw_remove, From patchwork Thu Mar 13 17:40:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015622 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 694F518F2FC for ; Thu, 13 Mar 2025 17:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887815; cv=none; b=f3N7tIuskr37v663RQc1Y3Ia5bzfBfYBPp1EG0MGBsGC1ob5CwmeDQe+xGwbJszXyxgoAVrwB2owpy8SeG6XHXHBgcJYkAvN2W9ziMGEMNuwYK9NGKibd4HYwVCuMRq2eKsjQUfSKXybGmp+6dx2jAYJxJCLt4vqL57T5oIs1dE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887815; c=relaxed/simple; bh=ICENAgvD+Uu/oArWNcOOcZiDB8Iu0giogIUuMKbWNps=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lDPJMoZI5pWYPmZXWqygUSEWPsjfGKUULigJn8yjQhy3YU5my0lF1ZPQA1RwGFfZlLlRHU+19mP2/3Vy5N9P19cnGSdCPVjc/rEL86lrCGzZh1+p1+MFNjM50QLiwjHrNJI37zlWd5AfNPdDymIrJybl9XX/4pG84r3gPdLds8I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OJLE1sL7; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=AHhOh8DL; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OJLE1sL7; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=AHhOh8DL; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OJLE1sL7"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="AHhOh8DL"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OJLE1sL7"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="AHhOh8DL" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 959BC1F788; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JWJDX1+2bHHgQb/2ibsdxbqplxn30jNeln4+TD72AXs=; b=OJLE1sL7HaFpPyXIP5Xz5gd1eJh57OQXg6ASmfCLcXfrHzRA0RifYBuilEgvDnNIEtkVgd fYlaFGNHZXBoTnvLty0n1Gg6cfWBlrNvsv4nGvs62cTBH2F+aVGn+UrwmxhYSrBMLLM3DA Hz2DmGFHw3UJYc82N+h/aDTJoZ6FBqc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JWJDX1+2bHHgQb/2ibsdxbqplxn30jNeln4+TD72AXs=; b=AHhOh8DLN89ZmPCT+bEr5hIzZawLzCuS/gK8EpK4Iva+H5DziD78eeSRURAmHk9Q9zAttZ V1vWtsoDPdO9vfDw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=OJLE1sL7; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=AHhOh8DL DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JWJDX1+2bHHgQb/2ibsdxbqplxn30jNeln4+TD72AXs=; b=OJLE1sL7HaFpPyXIP5Xz5gd1eJh57OQXg6ASmfCLcXfrHzRA0RifYBuilEgvDnNIEtkVgd fYlaFGNHZXBoTnvLty0n1Gg6cfWBlrNvsv4nGvs62cTBH2F+aVGn+UrwmxhYSrBMLLM3DA Hz2DmGFHw3UJYc82N+h/aDTJoZ6FBqc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JWJDX1+2bHHgQb/2ibsdxbqplxn30jNeln4+TD72AXs=; b=AHhOh8DLN89ZmPCT+bEr5hIzZawLzCuS/gK8EpK4Iva+H5DziD78eeSRURAmHk9Q9zAttZ V1vWtsoDPdO9vfDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6DB38137BA; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WNKEGecY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:59 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 33/89] ASoC: rt1318-sdw: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:38 +0100 Message-ID: <20250313174139.29942-34-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 959BC1F788 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt1318-sdw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1318-sdw.c b/sound/soc/codecs/rt1318-sdw.c index 319f71f5e60d..4eb636e0c9ed 100644 --- a/sound/soc/codecs/rt1318-sdw.c +++ b/sound/soc/codecs/rt1318-sdw.c @@ -807,7 +807,7 @@ static const struct sdw_device_id rt1318_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt1318_id); -static int __maybe_unused rt1318_dev_suspend(struct device *dev) +static int rt1318_dev_suspend(struct device *dev) { struct rt1318_sdw_priv *rt1318 = dev_get_drvdata(dev); @@ -820,7 +820,7 @@ static int __maybe_unused rt1318_dev_suspend(struct device *dev) #define RT1318_PROBE_TIMEOUT 5000 -static int __maybe_unused rt1318_dev_resume(struct device *dev) +static int rt1318_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt1318_sdw_priv *rt1318 = dev_get_drvdata(dev); @@ -848,14 +848,14 @@ static int __maybe_unused rt1318_dev_resume(struct device *dev) } static const struct dev_pm_ops rt1318_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt1318_dev_suspend, rt1318_dev_resume) - SET_RUNTIME_PM_OPS(rt1318_dev_suspend, rt1318_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt1318_dev_suspend, rt1318_dev_resume) + RUNTIME_PM_OPS(rt1318_dev_suspend, rt1318_dev_resume, NULL) }; static struct sdw_driver rt1318_sdw_driver = { .driver = { .name = "rt1318-sdca", - .pm = &rt1318_pm, + .pm = pm_ptr(&rt1318_pm), }, .probe = rt1318_sdw_probe, .remove = rt1318_sdw_remove, From patchwork Thu Mar 13 17:40:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015624 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B6E21ADC86 for ; Thu, 13 Mar 2025 17:43:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887821; cv=none; b=LKu3i80vzrt8O8Lx/6Cdu5UQnFVzIntrbRoGmmgFb6B1QwN5ccY63chKc+yrcXAbM9Km2qeErBceAWhkjuXG7F+bgO0XugwEbuj4TyOiVHhFQTfEWMEg50Vq/QLQwbgEqe4cuxSunHrVrD2zCo1mT7Af9J0L7oW4CWZrdj0Frek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887821; c=relaxed/simple; bh=FUfII2VSdR3k36KnNQ3CvRAWLnhKmUZhB9WtFgWeaGw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ow2KIsTCEHWzUekdp34m/+fSw57/g5ILktr62vbCAkdo9o5kdoAhc7sKtov0nK7/cEVKh7S13vBq6lX4hx+UsaArCRe8FhYL9QyIpoQa2vv74nmMOfuDAcLrZYFdXcVWFMppladKsmpLb6wrlujskWmWXYf8UlLEFoWjvnmOa/g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=EjjMYKHn; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QSfSYcOo; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=EjjMYKHn; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QSfSYcOo; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EjjMYKHn"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QSfSYcOo"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EjjMYKHn"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QSfSYcOo" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C2EFA1F79D; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Aa9U0ADXZ4ygTdEfqiE/J8IwIMFwgOntb0zE8Ssc4Q=; b=EjjMYKHnDA02iwRJiLz1IyEbxukkj3Ox66HbXFsQMVsvws4+Wda5KK8yUCDUVfpTzuLYgG XFVM4kIfqGHMShMcXr9niYnkE92iyC3nfQ7swRt5DEhT+iS6ZyFzWl19w6GjAppvN/iSJn 51aDSDmaQalLQcCqV4V/Tt6LDQqGjiU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Aa9U0ADXZ4ygTdEfqiE/J8IwIMFwgOntb0zE8Ssc4Q=; b=QSfSYcOoMocQG3dWwXppYHvN7LoFkF6uVVQ9sFWI28ZbgwDHBZA/RPkKNrLCp4f6FO7Khn VDxoPuz41hLL/fDw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Aa9U0ADXZ4ygTdEfqiE/J8IwIMFwgOntb0zE8Ssc4Q=; b=EjjMYKHnDA02iwRJiLz1IyEbxukkj3Ox66HbXFsQMVsvws4+Wda5KK8yUCDUVfpTzuLYgG XFVM4kIfqGHMShMcXr9niYnkE92iyC3nfQ7swRt5DEhT+iS6ZyFzWl19w6GjAppvN/iSJn 51aDSDmaQalLQcCqV4V/Tt6LDQqGjiU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887719; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Aa9U0ADXZ4ygTdEfqiE/J8IwIMFwgOntb0zE8Ssc4Q=; b=QSfSYcOoMocQG3dWwXppYHvN7LoFkF6uVVQ9sFWI28ZbgwDHBZA/RPkKNrLCp4f6FO7Khn VDxoPuz41hLL/fDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9C5B6139D2; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id KD3uJOcY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:59 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 34/89] ASoC: rt1320-sdw: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:39 +0100 Message-ID: <20250313174139.29942-35-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt1320-sdw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c index d83b236a0450..f51ba345a16e 100644 --- a/sound/soc/codecs/rt1320-sdw.c +++ b/sound/soc/codecs/rt1320-sdw.c @@ -1458,7 +1458,7 @@ static const struct sdw_device_id rt1320_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt1320_id); -static int __maybe_unused rt1320_dev_suspend(struct device *dev) +static int rt1320_dev_suspend(struct device *dev) { struct rt1320_sdw_priv *rt1320 = dev_get_drvdata(dev); @@ -1472,7 +1472,7 @@ static int __maybe_unused rt1320_dev_suspend(struct device *dev) #define RT1320_PROBE_TIMEOUT 5000 -static int __maybe_unused rt1320_dev_resume(struct device *dev) +static int rt1320_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt1320_sdw_priv *rt1320 = dev_get_drvdata(dev); @@ -1501,14 +1501,14 @@ static int __maybe_unused rt1320_dev_resume(struct device *dev) } static const struct dev_pm_ops rt1320_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt1320_dev_suspend, rt1320_dev_resume) - SET_RUNTIME_PM_OPS(rt1320_dev_suspend, rt1320_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt1320_dev_suspend, rt1320_dev_resume) + RUNTIME_PM_OPS(rt1320_dev_suspend, rt1320_dev_resume, NULL) }; static struct sdw_driver rt1320_sdw_driver = { .driver = { .name = "rt1320-sdca", - .pm = &rt1320_pm, + .pm = pm_ptr(&rt1320_pm), }, .probe = rt1320_sdw_probe, .remove = rt1320_sdw_remove, From patchwork Thu Mar 13 17:40:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015626 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7267B1C84B6 for ; Thu, 13 Mar 2025 17:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887827; cv=none; b=HoiGXTO/3gt5S/RgvENMP0b/bQL50FE58pubpykCyLr7VcWDPEd0s80DOUJdL+8YreO+niZprfdN5YeHPDf7f7Yr6GH6rSr8MK7xzO7hpG2oRcXfM2Sd0fmQxS3qcw1pbHtSTPeIl3gfdn/SyR5ZuExn5ILSxwkucP+Kj2V7isY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887827; c=relaxed/simple; bh=IWAXQFNbSbAgYt3g/zQqML1IyIfDQ/JOsuxtf5uNJ/s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i2cuLVb47wmvCj5ZuNhJiZ7yNQUK/PxcICp7BIdlneEAQnRF9ZTDiPPRYl0wmIOzMYZ+o0+5wMT7Q68jTZ2/zLneDUuXSgwOQf3rBFzbMsksQna/dm8AE99s6FemAassocfw5GWLZ35OLqA572JGXBfoj4N5PdEN8uXOKipEfjI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=FgBWbdMM; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=jCLo7IpM; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=FgBWbdMM; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=jCLo7IpM; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="FgBWbdMM"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="jCLo7IpM"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="FgBWbdMM"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="jCLo7IpM" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 047A91F79E; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lr/xn/UFswW2B2xqi+2ytk231nmCh2Lj9enlFEBPJAc=; b=FgBWbdMMMRHVi3AbzfBGprARjAWBywoZGsHh92i9Te5uGVlMJanYdsMSNH6ZgvxCxKpz7k wuNzMJfXS4lJXrFNMoTKm2g4smsVkSO3hjdJfbREyC2QfLmBUmsZds9siLCB0Tuqn5sfvk k2CKFpUuXspY22UQPApV31ef1UBV1k8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lr/xn/UFswW2B2xqi+2ytk231nmCh2Lj9enlFEBPJAc=; b=jCLo7IpMIfr6/KnQcTtCPxmCW+8SB9yiTTJmv11dXiDw/JcmIQega1gHWYBQSsKamgmnG6 S0j56cj6vblGr/Dg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=FgBWbdMM; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=jCLo7IpM DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lr/xn/UFswW2B2xqi+2ytk231nmCh2Lj9enlFEBPJAc=; b=FgBWbdMMMRHVi3AbzfBGprARjAWBywoZGsHh92i9Te5uGVlMJanYdsMSNH6ZgvxCxKpz7k wuNzMJfXS4lJXrFNMoTKm2g4smsVkSO3hjdJfbREyC2QfLmBUmsZds9siLCB0Tuqn5sfvk k2CKFpUuXspY22UQPApV31ef1UBV1k8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lr/xn/UFswW2B2xqi+2ytk231nmCh2Lj9enlFEBPJAc=; b=jCLo7IpMIfr6/KnQcTtCPxmCW+8SB9yiTTJmv11dXiDw/JcmIQega1gHWYBQSsKamgmnG6 S0j56cj6vblGr/Dg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C9CB9137BA; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OHj8L+cY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:59 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 35/89] ASoC: rt5514: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:40 +0100 Message-ID: <20250313174139.29942-36-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 047A91F79E X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt5514-spi.c | 8 ++++---- sound/soc/codecs/rt5514.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c index f475c8cfadae..54d84581ec47 100644 --- a/sound/soc/codecs/rt5514-spi.c +++ b/sound/soc/codecs/rt5514-spi.c @@ -458,7 +458,7 @@ static int rt5514_spi_probe(struct spi_device *spi) return 0; } -static int __maybe_unused rt5514_suspend(struct device *dev) +static int rt5514_suspend(struct device *dev) { int irq = to_spi_device(dev)->irq; @@ -468,7 +468,7 @@ static int __maybe_unused rt5514_suspend(struct device *dev) return 0; } -static int __maybe_unused rt5514_resume(struct device *dev) +static int rt5514_resume(struct device *dev) { struct rt5514_dsp *rt5514_dsp = dev_get_drvdata(dev); int irq = to_spi_device(dev)->irq; @@ -490,7 +490,7 @@ static int __maybe_unused rt5514_resume(struct device *dev) } static const struct dev_pm_ops rt5514_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(rt5514_suspend, rt5514_resume) + SYSTEM_SLEEP_PM_OPS(rt5514_suspend, rt5514_resume) }; static const struct of_device_id rt5514_of_match[] = { @@ -502,7 +502,7 @@ MODULE_DEVICE_TABLE(of, rt5514_of_match); static struct spi_driver rt5514_spi_driver = { .driver = { .name = "rt5514", - .pm = &rt5514_pm_ops, + .pm = pm_ptr(&rt5514_pm_ops), .of_match_table = of_match_ptr(rt5514_of_match), }, .probe = rt5514_spi_probe, diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c index a7f984b5d80f..ab9d81c32be8 100644 --- a/sound/soc/codecs/rt5514.c +++ b/sound/soc/codecs/rt5514.c @@ -1231,7 +1231,7 @@ static int rt5514_parse_dp(struct rt5514_priv *rt5514, struct device *dev) return 0; } -static __maybe_unused int rt5514_i2c_resume(struct device *dev) +static int rt5514_i2c_resume(struct device *dev) { struct rt5514_priv *rt5514 = dev_get_drvdata(dev); unsigned int val; @@ -1313,7 +1313,7 @@ static int rt5514_i2c_probe(struct i2c_client *i2c) } static const struct dev_pm_ops rt5514_i2_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(NULL, rt5514_i2c_resume) + SYSTEM_SLEEP_PM_OPS(NULL, rt5514_i2c_resume) }; static struct i2c_driver rt5514_i2c_driver = { @@ -1321,7 +1321,7 @@ static struct i2c_driver rt5514_i2c_driver = { .name = "rt5514", .acpi_match_table = ACPI_PTR(rt5514_acpi_match), .of_match_table = of_match_ptr(rt5514_of_match), - .pm = &rt5514_i2_pm_ops, + .pm = pm_ptr(&rt5514_i2_pm_ops), }, .probe = rt5514_i2c_probe, .id_table = rt5514_i2c_id, From patchwork Thu Mar 13 17:40:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015625 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82DA11C84A8 for ; Thu, 13 Mar 2025 17:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887826; cv=none; b=ZnW9rQz42432GBQ3DEZkLHLHYaTg3bpi7uGWNhU+FlMWwmLl/jq6Neotqnlswor2pwAZcTbFLF+HYTVmRtNLwyRzk+kpD1d0eE8mCmTZi+LpxwfoS8/1TGZkkMYTxhyWJiFJ1xVr6fdnoTs1jsb/jzPO/sXBUq0JW+zKMRjw1gk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887826; c=relaxed/simple; bh=SGiu7wyxmA0vVffRNTaOq7+hyShILm2BlmSJSR6MsSs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BCllmEmWPDjYJwqZGyZummLCxIdS74pEjA/sb3hq38huJR9X32Kj00rQv6xgp79fVtO7OPIjKUlVwzYADhr+a6Tv1uaiPViYd5oHU7FZ6fVoqr9A8PLkdX+mjNYxrZSXadLUKgICxIAUeRmhMV6nuygylvDf9LTnwW+BOS4yehA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=S+LBIH2m; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=m/p2xZMj; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=S+LBIH2m; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=m/p2xZMj; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="S+LBIH2m"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="m/p2xZMj"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="S+LBIH2m"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="m/p2xZMj" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 36CFC211DF; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UteLMKyQ0Zb+NUxlvWU1Jge50ZQzXLshajVazhZn3/I=; b=S+LBIH2mGBrQzY7e08T8W4Ovn2Gji6tk9F/ljkIz8OZ37TD8dl+l3x+Gl3Cy5IIPUDOFqC DYPpY2g7KhHCu+TFHdCFslTvu5MgJdn2inrquTKhnrztKBJAFh4xF57DoGJtDR1oCDnkVP Yy5bWeyR18+jHB7dZEyYJ/P7F5FsPdQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UteLMKyQ0Zb+NUxlvWU1Jge50ZQzXLshajVazhZn3/I=; b=m/p2xZMjAe8JWCqnGij0WyNVT95sYFzkZwZQEG+Y/8Xy04T1o0xrHzxnoA59VY3CR3+Sk5 dsN8onL8F8G09OBQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UteLMKyQ0Zb+NUxlvWU1Jge50ZQzXLshajVazhZn3/I=; b=S+LBIH2mGBrQzY7e08T8W4Ovn2Gji6tk9F/ljkIz8OZ37TD8dl+l3x+Gl3Cy5IIPUDOFqC DYPpY2g7KhHCu+TFHdCFslTvu5MgJdn2inrquTKhnrztKBJAFh4xF57DoGJtDR1oCDnkVP Yy5bWeyR18+jHB7dZEyYJ/P7F5FsPdQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UteLMKyQ0Zb+NUxlvWU1Jge50ZQzXLshajVazhZn3/I=; b=m/p2xZMjAe8JWCqnGij0WyNVT95sYFzkZwZQEG+Y/8Xy04T1o0xrHzxnoA59VY3CR3+Sk5 dsN8onL8F8G09OBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 02FE6139D2; Thu, 13 Mar 2025 17:41:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id iMANO+cY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:41:59 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 36/89] ASoC: rt5645: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:41 +0100 Message-ID: <20250313174139.29942-37-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt5645.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 2680bcce4c95..343e3bcef0ca 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -4314,7 +4314,7 @@ static void rt5645_i2c_shutdown(struct i2c_client *i2c) gpiod_set_value(rt5645->gpiod_cbj_sleeve, 0); } -static int __maybe_unused rt5645_sys_suspend(struct device *dev) +static int rt5645_sys_suspend(struct device *dev) { struct rt5645_priv *rt5645 = dev_get_drvdata(dev); @@ -4327,7 +4327,7 @@ static int __maybe_unused rt5645_sys_suspend(struct device *dev) return 0; } -static int __maybe_unused rt5645_sys_resume(struct device *dev) +static int rt5645_sys_resume(struct device *dev) { struct rt5645_priv *rt5645 = dev_get_drvdata(dev); @@ -4342,7 +4342,7 @@ static int __maybe_unused rt5645_sys_resume(struct device *dev) } static const struct dev_pm_ops rt5645_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt5645_sys_suspend, rt5645_sys_resume) + SYSTEM_SLEEP_PM_OPS(rt5645_sys_suspend, rt5645_sys_resume) }; static struct i2c_driver rt5645_i2c_driver = { @@ -4350,7 +4350,7 @@ static struct i2c_driver rt5645_i2c_driver = { .name = "rt5645", .of_match_table = of_match_ptr(rt5645_of_match), .acpi_match_table = ACPI_PTR(rt5645_acpi_match), - .pm = &rt5645_pm, + .pm = pm_ptr(&rt5645_pm), }, .probe = rt5645_i2c_probe, .remove = rt5645_i2c_remove, From patchwork Thu Mar 13 17:40:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015627 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0CC518F2FC for ; Thu, 13 Mar 2025 17:43:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887832; cv=none; b=qpvkUm69/yu+VYTNgxHgE8i2xLU0njve/EWsLJ0+0KusqozMCZwoKBVQbpQacybqUCKF3NnsnvkJYP0RCn0Z5JKRseeoHywnu/byCcNeVP4/TyKab+LAx3wbuwgeLi0LlFS2DJR3mfYSByGI04cTpQd57P0QcSFlKfibfnRoDWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887832; c=relaxed/simple; bh=lGQm0vu2MPU6v2OpUJEgZRifvyjxdBZxqWgPe6Y/rp8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YYkp6Q/xa/T4gMHgpAzC70gNzmGgfigBNFLIKfojtUlz51vZWyvZbnbvvxaBTu+xzCW4nEusKYJb1HolB3RdTSVdOTNXQ9rWwU312Y9fGTxsgT8zBrqTHaPCaEM9qotdfvbPKrtpN6WhN2BL4Oxdu1R7fIsswu9wsyqPi4PaSwY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ISImHjU/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=jKyWT/X/; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ISImHjU/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=jKyWT/X/; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ISImHjU/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="jKyWT/X/"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ISImHjU/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="jKyWT/X/" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 58AF7211E3; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rT0bfTJcPw2ieHNn+Vp7icDddPRsUCiOnr5XOu7kLbM=; b=ISImHjU/Jwn0eqNXFrSOj6Kano0oEBHzcPeX+5UaWCqqw6BoWCPdplxtC4qTwcqhJ0VKfm /2D+uhz8XKrwB7OxdJYZgi5f0PamUDoAzUmKB316MopaC4iwEruTz6QXVL6FmZ04Rr4/qP sfTKFrYFbO/3+UhOJPPz28q5roUMw3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rT0bfTJcPw2ieHNn+Vp7icDddPRsUCiOnr5XOu7kLbM=; b=jKyWT/X/xUQ//u8El4jDhW+kUvRMVrVN/Bf6TOUIgxFiqRoj8Kh5fBMJIeFy8peVdYrtgs Say8Swg2CCCb2iAw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="ISImHjU/"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="jKyWT/X/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rT0bfTJcPw2ieHNn+Vp7icDddPRsUCiOnr5XOu7kLbM=; b=ISImHjU/Jwn0eqNXFrSOj6Kano0oEBHzcPeX+5UaWCqqw6BoWCPdplxtC4qTwcqhJ0VKfm /2D+uhz8XKrwB7OxdJYZgi5f0PamUDoAzUmKB316MopaC4iwEruTz6QXVL6FmZ04Rr4/qP sfTKFrYFbO/3+UhOJPPz28q5roUMw3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rT0bfTJcPw2ieHNn+Vp7icDddPRsUCiOnr5XOu7kLbM=; b=jKyWT/X/xUQ//u8El4jDhW+kUvRMVrVN/Bf6TOUIgxFiqRoj8Kh5fBMJIeFy8peVdYrtgs Say8Swg2CCCb2iAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 316CE137BA; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EMHOCugY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:00 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 37/89] ASoC: rt5682-sdw: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:42 +0100 Message-ID: <20250313174139.29942-38-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 58AF7211E3 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt5682-sdw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c index 5edf11e136b4..aa229894129b 100644 --- a/sound/soc/codecs/rt5682-sdw.c +++ b/sound/soc/codecs/rt5682-sdw.c @@ -709,7 +709,7 @@ static const struct sdw_device_id rt5682_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt5682_id); -static int __maybe_unused rt5682_dev_suspend(struct device *dev) +static int rt5682_dev_suspend(struct device *dev) { struct rt5682_priv *rt5682 = dev_get_drvdata(dev); @@ -725,7 +725,7 @@ static int __maybe_unused rt5682_dev_suspend(struct device *dev) return 0; } -static int __maybe_unused rt5682_dev_system_suspend(struct device *dev) +static int rt5682_dev_system_suspend(struct device *dev) { struct rt5682_priv *rt5682 = dev_get_drvdata(dev); struct sdw_slave *slave = dev_to_sdw_dev(dev); @@ -753,7 +753,7 @@ static int __maybe_unused rt5682_dev_system_suspend(struct device *dev) return rt5682_dev_suspend(dev); } -static int __maybe_unused rt5682_dev_resume(struct device *dev) +static int rt5682_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt5682_priv *rt5682 = dev_get_drvdata(dev); @@ -791,14 +791,14 @@ static int __maybe_unused rt5682_dev_resume(struct device *dev) } static const struct dev_pm_ops rt5682_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt5682_dev_system_suspend, rt5682_dev_resume) - SET_RUNTIME_PM_OPS(rt5682_dev_suspend, rt5682_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt5682_dev_system_suspend, rt5682_dev_resume) + RUNTIME_PM_OPS(rt5682_dev_suspend, rt5682_dev_resume, NULL) }; static struct sdw_driver rt5682_sdw_driver = { .driver = { .name = "rt5682", - .pm = &rt5682_pm, + .pm = pm_ptr(&rt5682_pm), }, .probe = rt5682_sdw_probe, .remove = rt5682_sdw_remove, From patchwork Thu Mar 13 17:40:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015629 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AAB91ADC86 for ; Thu, 13 Mar 2025 17:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887838; cv=none; b=hzNEy1qFFYAw+QpsMpeMTBcO1dSnCIp8/B9olcDpgxL/WeWRbq42hUE1hguML7EamyKp+t+OwuuJfJussUC1MVI+i4lfCCjXL73mVz6GZwGgJnivgwopcKxja9SjAQOPQkwyZKt/uW3xl+NemJoz62pNFwkPeT/9ec1dBM0zFGc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887838; c=relaxed/simple; bh=5b/My2GtOW6VFpy409tBQFwiDX0OlfZN5gEE8Q/oGV4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GLz4HuYHN8GaBSD1zhOvbfc2urvCXitV7r3DCEG0dsbP8C4aTQ3ZaOJ8Tedj1r2ywZCT8B12ity42Rxy9NLEQ5woRA67iYmdM9Dd47uNW7M7IXLawUkLUWTOhE9TEihEQbEx0yeP+Kh8cCxvMHV7tRsmRsTfnlOG5s0aTLPBwNQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=LpS2bC6y; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=mJo7IzoP; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=LpS2bC6y; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=mJo7IzoP; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="LpS2bC6y"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="mJo7IzoP"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="LpS2bC6y"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="mJo7IzoP" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 85742211E4; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kzTFrHQ7Ify4rz+VRrkwhGnLnzLf5M1RU5kY1JIxY4g=; b=LpS2bC6y+XBFspw3VaY86fnnZoWD+fLlCXhcWsnw7d/iOuQXLJqCjsGyGqaKKz+0EnHI6W NvX6u2XJODsx4vyTvBm6rAh/1lSO8Eu59qTZXsOfd55EBmwmZs12QadomaLanjBS6qTBVI qNApMuQNC26LGuTc/jNDDE75x1RJSoo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kzTFrHQ7Ify4rz+VRrkwhGnLnzLf5M1RU5kY1JIxY4g=; b=mJo7IzoP9NzQ4LX1B1y86PMEYu++dX4TxGMfWOythqhy8Z6mNecG7SdTgW0pgQr9exkvs3 PrOKgPC1/Drj6JBg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kzTFrHQ7Ify4rz+VRrkwhGnLnzLf5M1RU5kY1JIxY4g=; b=LpS2bC6y+XBFspw3VaY86fnnZoWD+fLlCXhcWsnw7d/iOuQXLJqCjsGyGqaKKz+0EnHI6W NvX6u2XJODsx4vyTvBm6rAh/1lSO8Eu59qTZXsOfd55EBmwmZs12QadomaLanjBS6qTBVI qNApMuQNC26LGuTc/jNDDE75x1RJSoo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kzTFrHQ7Ify4rz+VRrkwhGnLnzLf5M1RU5kY1JIxY4g=; b=mJo7IzoP9NzQ4LX1B1y86PMEYu++dX4TxGMfWOythqhy8Z6mNecG7SdTgW0pgQr9exkvs3 PrOKgPC1/Drj6JBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5FC68139D2; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id GKcbFugY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:00 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 38/89] ASoC: rt700-sdw: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:43 +0100 Message-ID: <20250313174139.29942-39-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt700-sdw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c index 24cb895b759f..44543c0da177 100644 --- a/sound/soc/codecs/rt700-sdw.c +++ b/sound/soc/codecs/rt700-sdw.c @@ -475,7 +475,7 @@ static const struct sdw_device_id rt700_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt700_id); -static int __maybe_unused rt700_dev_suspend(struct device *dev) +static int rt700_dev_suspend(struct device *dev) { struct rt700_priv *rt700 = dev_get_drvdata(dev); @@ -490,7 +490,7 @@ static int __maybe_unused rt700_dev_suspend(struct device *dev) return 0; } -static int __maybe_unused rt700_dev_system_suspend(struct device *dev) +static int rt700_dev_system_suspend(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt700_priv *rt700 = dev_get_drvdata(dev); @@ -520,7 +520,7 @@ static int __maybe_unused rt700_dev_system_suspend(struct device *dev) #define RT700_PROBE_TIMEOUT 5000 -static int __maybe_unused rt700_dev_resume(struct device *dev) +static int rt700_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt700_priv *rt700 = dev_get_drvdata(dev); @@ -551,14 +551,14 @@ static int __maybe_unused rt700_dev_resume(struct device *dev) } static const struct dev_pm_ops rt700_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt700_dev_system_suspend, rt700_dev_resume) - SET_RUNTIME_PM_OPS(rt700_dev_suspend, rt700_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt700_dev_system_suspend, rt700_dev_resume) + RUNTIME_PM_OPS(rt700_dev_suspend, rt700_dev_resume, NULL) }; static struct sdw_driver rt700_sdw_driver = { .driver = { .name = "rt700", - .pm = &rt700_pm, + .pm = pm_ptr(&rt700_pm), }, .probe = rt700_sdw_probe, .remove = rt700_sdw_remove, From patchwork Thu Mar 13 17:40:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015628 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39A261B3F3D for ; Thu, 13 Mar 2025 17:43:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887833; cv=none; b=dn9//U4FbpTXdjIO3F7MMofQGeonjrlwiOx6ApSv1R2kAZr63+gRQ5XpPYuMTucc+SECCW6PnMBbx9i2JzXbeLQ129va/kBi28l1NcgqiAGjpCnhzjZFSKZlgKuug0XpxWjpKwB8PR+MS1wp5bM0R1yMaeKydHzbjY6bUzwMhYg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887833; c=relaxed/simple; bh=hl3DQYv8akAeMMKV6k1sODDMPSVyM+GR4yJeOo97pY8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NKpNC56uoBs6utAUnGmOyNA5ivc6+q7V3zbDKKc2XXF9AHoSRBeJzOMXf+J5JvDFJu+V+a6Al93BLW/aBB/dHeDnKY87stgRGMegnZlUMvIdUVxZQQfAelhvo8bipsRXL45SDDbL9C7W90lB/+ct/c7+tY+LlkD849bIAqignlI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rSoWIHiu; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=tVaOMuIS; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rSoWIHiu; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=tVaOMuIS; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rSoWIHiu"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="tVaOMuIS"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rSoWIHiu"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="tVaOMuIS" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B362A1F7A0; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fDXtIRUFJqY1bq8gmNzVbZ27Xh1So3jy7aceCTnasZk=; b=rSoWIHiu2AapBNpuiBWucThec8+bv6vyYv/ArDrYFGb9HvStHH8iaipaJtRx3Gx+NG0PKK hyhcaUNvePhXfFSxgMOa49wUvXU6yuQjgzy/W8E9VTQFp6hhkV7wSDF9WMjz1vpolHxTdE L/fbA0Qxjy8YpDp0jDjLEcd+2lq579M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fDXtIRUFJqY1bq8gmNzVbZ27Xh1So3jy7aceCTnasZk=; b=tVaOMuISXPyNR6uV3d6nNHLtvKU1jeAR5DsIpmWLtzXsFV2jNFfZ0ZQ50IVOYU5Y/P4uj3 Wg2p6oumqmTwBaBg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=rSoWIHiu; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=tVaOMuIS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fDXtIRUFJqY1bq8gmNzVbZ27Xh1So3jy7aceCTnasZk=; b=rSoWIHiu2AapBNpuiBWucThec8+bv6vyYv/ArDrYFGb9HvStHH8iaipaJtRx3Gx+NG0PKK hyhcaUNvePhXfFSxgMOa49wUvXU6yuQjgzy/W8E9VTQFp6hhkV7wSDF9WMjz1vpolHxTdE L/fbA0Qxjy8YpDp0jDjLEcd+2lq579M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fDXtIRUFJqY1bq8gmNzVbZ27Xh1So3jy7aceCTnasZk=; b=tVaOMuISXPyNR6uV3d6nNHLtvKU1jeAR5DsIpmWLtzXsFV2jNFfZ0ZQ50IVOYU5Y/P4uj3 Wg2p6oumqmTwBaBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8D3CF137BA; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QJIMIegY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:00 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 39/89] ASoC: rt711: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:44 +0100 Message-ID: <20250313174139.29942-40-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: B362A1F7A0 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt711-sdca-sdw.c | 12 ++++++------ sound/soc/codecs/rt711-sdw.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sound/soc/codecs/rt711-sdca-sdw.c b/sound/soc/codecs/rt711-sdca-sdw.c index f5933d2e085e..adf05f64259b 100644 --- a/sound/soc/codecs/rt711-sdca-sdw.c +++ b/sound/soc/codecs/rt711-sdca-sdw.c @@ -380,7 +380,7 @@ static const struct sdw_device_id rt711_sdca_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt711_sdca_id); -static int __maybe_unused rt711_sdca_dev_suspend(struct device *dev) +static int rt711_sdca_dev_suspend(struct device *dev) { struct rt711_sdca_priv *rt711 = dev_get_drvdata(dev); @@ -396,7 +396,7 @@ static int __maybe_unused rt711_sdca_dev_suspend(struct device *dev) return 0; } -static int __maybe_unused rt711_sdca_dev_system_suspend(struct device *dev) +static int rt711_sdca_dev_system_suspend(struct device *dev) { struct rt711_sdca_priv *rt711_sdca = dev_get_drvdata(dev); struct sdw_slave *slave = dev_to_sdw_dev(dev); @@ -428,7 +428,7 @@ static int __maybe_unused rt711_sdca_dev_system_suspend(struct device *dev) #define RT711_PROBE_TIMEOUT 5000 -static int __maybe_unused rt711_sdca_dev_resume(struct device *dev) +static int rt711_sdca_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt711_sdca_priv *rt711 = dev_get_drvdata(dev); @@ -467,14 +467,14 @@ static int __maybe_unused rt711_sdca_dev_resume(struct device *dev) } static const struct dev_pm_ops rt711_sdca_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt711_sdca_dev_system_suspend, rt711_sdca_dev_resume) - SET_RUNTIME_PM_OPS(rt711_sdca_dev_suspend, rt711_sdca_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt711_sdca_dev_system_suspend, rt711_sdca_dev_resume) + RUNTIME_PM_OPS(rt711_sdca_dev_suspend, rt711_sdca_dev_resume, NULL) }; static struct sdw_driver rt711_sdca_sdw_driver = { .driver = { .name = "rt711-sdca", - .pm = &rt711_sdca_pm, + .pm = pm_ptr(&rt711_sdca_pm), }, .probe = rt711_sdca_sdw_probe, .remove = rt711_sdca_sdw_remove, diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c index dfda6bb5c6f8..93a5a89a96b1 100644 --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -482,7 +482,7 @@ static const struct sdw_device_id rt711_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt711_id); -static int __maybe_unused rt711_dev_suspend(struct device *dev) +static int rt711_dev_suspend(struct device *dev) { struct rt711_priv *rt711 = dev_get_drvdata(dev); @@ -498,7 +498,7 @@ static int __maybe_unused rt711_dev_suspend(struct device *dev) return 0; } -static int __maybe_unused rt711_dev_system_suspend(struct device *dev) +static int rt711_dev_system_suspend(struct device *dev) { struct rt711_priv *rt711 = dev_get_drvdata(dev); struct sdw_slave *slave = dev_to_sdw_dev(dev); @@ -528,7 +528,7 @@ static int __maybe_unused rt711_dev_system_suspend(struct device *dev) #define RT711_PROBE_TIMEOUT 5000 -static int __maybe_unused rt711_dev_resume(struct device *dev) +static int rt711_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt711_priv *rt711 = dev_get_drvdata(dev); @@ -564,14 +564,14 @@ static int __maybe_unused rt711_dev_resume(struct device *dev) } static const struct dev_pm_ops rt711_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt711_dev_system_suspend, rt711_dev_resume) - SET_RUNTIME_PM_OPS(rt711_dev_suspend, rt711_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt711_dev_system_suspend, rt711_dev_resume) + RUNTIME_PM_OPS(rt711_dev_suspend, rt711_dev_resume, NULL) }; static struct sdw_driver rt711_sdw_driver = { .driver = { .name = "rt711", - .pm = &rt711_pm, + .pm = pm_ptr(&rt711_pm), }, .probe = rt711_sdw_probe, .remove = rt711_sdw_remove, From patchwork Thu Mar 13 17:40:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015630 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF0C01B3F3D for ; Thu, 13 Mar 2025 17:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887839; cv=none; b=C4nYoMSg/Ila0y5oIfAnBnKTS+840KQbsS8wVsSF1ML3omjV50XRIbMic6yZuUoA1wP694r0csC9gcbBfQNVCc/PJjiMhLMY3qRnz5DQpZ/jG6da64eQC/sK4A1kRYzvyl/9Zm0G5HQ/gnMEy6yfeMpla4yBTH6xT1+WEyiT+H4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887839; c=relaxed/simple; bh=gYBnuLRuaLh9jFY6jeMzAeSTB1bIkzp1Jnps1FLM2gE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c40bA/uwy5Az6IrXACgnQOy7FckhZekg7/4MhxtUgive07Hj0Bhoctzhtl7fPhV7JP/maznECDXFUNg6hsmqugGADEEE9VBgsJ0BWNj3G+cIXiUDsthBPTI2iiuEWlN6fSpB06PJiRk39dk099v/S0o5gcnUFGS1jJe74xh2fQg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=yWxdXje3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=nE9XNFCN; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=yWxdXje3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=nE9XNFCN; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="yWxdXje3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="nE9XNFCN"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="yWxdXje3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="nE9XNFCN" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E131A1F76B; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T5S5xtFw62rzQ3TnIe/iZpBMxpbkcueUfsxmwKmq4R0=; b=yWxdXje3OfF4IjVxU+I/DPyGohPnY/Gd7hJazbZ0u9OFVO3y2CF1HAtq8FXTPbxClbZxP0 CgE688+R5s1mOGwaYwZy+H1Waob+HmHtJT18H9E/AgdQn1yU/7zDPG2ouKM6kZDLoU6TLk z6YbhHPoWEXTOGfRh4qqJXoHYbgMcUA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T5S5xtFw62rzQ3TnIe/iZpBMxpbkcueUfsxmwKmq4R0=; b=nE9XNFCNxkFLMb2pKp5B1cBEC26E+MxCNxI0YKg+VqHmqCXrF9h2XYJW46L5ukEVWPODwv sL2vcKBBr6u7v4AQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T5S5xtFw62rzQ3TnIe/iZpBMxpbkcueUfsxmwKmq4R0=; b=yWxdXje3OfF4IjVxU+I/DPyGohPnY/Gd7hJazbZ0u9OFVO3y2CF1HAtq8FXTPbxClbZxP0 CgE688+R5s1mOGwaYwZy+H1Waob+HmHtJT18H9E/AgdQn1yU/7zDPG2ouKM6kZDLoU6TLk z6YbhHPoWEXTOGfRh4qqJXoHYbgMcUA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887720; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T5S5xtFw62rzQ3TnIe/iZpBMxpbkcueUfsxmwKmq4R0=; b=nE9XNFCNxkFLMb2pKp5B1cBEC26E+MxCNxI0YKg+VqHmqCXrF9h2XYJW46L5ukEVWPODwv sL2vcKBBr6u7v4AQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id BA8D6139D2; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id GKs9LOgY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:00 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 40/89] ASoC: rt712: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:45 +0100 Message-ID: <20250313174139.29942-41-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt712-sdca-dmic.c | 12 ++++++------ sound/soc/codecs/rt712-sdca-sdw.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sound/soc/codecs/rt712-sdca-dmic.c b/sound/soc/codecs/rt712-sdca-dmic.c index ee5435f3a80a..db011da63bd9 100644 --- a/sound/soc/codecs/rt712-sdca-dmic.c +++ b/sound/soc/codecs/rt712-sdca-dmic.c @@ -884,7 +884,7 @@ static const struct sdw_device_id rt712_sdca_dmic_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt712_sdca_dmic_id); -static int __maybe_unused rt712_sdca_dmic_dev_suspend(struct device *dev) +static int rt712_sdca_dmic_dev_suspend(struct device *dev) { struct rt712_sdca_dmic_priv *rt712 = dev_get_drvdata(dev); @@ -897,7 +897,7 @@ static int __maybe_unused rt712_sdca_dmic_dev_suspend(struct device *dev) return 0; } -static int __maybe_unused rt712_sdca_dmic_dev_system_suspend(struct device *dev) +static int rt712_sdca_dmic_dev_system_suspend(struct device *dev) { struct rt712_sdca_dmic_priv *rt712_sdca = dev_get_drvdata(dev); @@ -909,7 +909,7 @@ static int __maybe_unused rt712_sdca_dmic_dev_system_suspend(struct device *dev) #define RT712_PROBE_TIMEOUT 5000 -static int __maybe_unused rt712_sdca_dmic_dev_resume(struct device *dev) +static int rt712_sdca_dmic_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt712_sdca_dmic_priv *rt712 = dev_get_drvdata(dev); @@ -941,8 +941,8 @@ static int __maybe_unused rt712_sdca_dmic_dev_resume(struct device *dev) } static const struct dev_pm_ops rt712_sdca_dmic_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt712_sdca_dmic_dev_system_suspend, rt712_sdca_dmic_dev_resume) - SET_RUNTIME_PM_OPS(rt712_sdca_dmic_dev_suspend, rt712_sdca_dmic_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt712_sdca_dmic_dev_system_suspend, rt712_sdca_dmic_dev_resume) + RUNTIME_PM_OPS(rt712_sdca_dmic_dev_suspend, rt712_sdca_dmic_dev_resume, NULL) }; @@ -978,7 +978,7 @@ static int rt712_sdca_dmic_sdw_remove(struct sdw_slave *slave) static struct sdw_driver rt712_sdca_dmic_sdw_driver = { .driver = { .name = "rt712-sdca-dmic", - .pm = &rt712_sdca_dmic_pm, + .pm = pm_ptr(&rt712_sdca_dmic_pm), }, .probe = rt712_sdca_dmic_sdw_probe, .remove = rt712_sdca_dmic_sdw_remove, diff --git a/sound/soc/codecs/rt712-sdca-sdw.c b/sound/soc/codecs/rt712-sdca-sdw.c index b584a3f854b8..ea07131edfa2 100644 --- a/sound/soc/codecs/rt712-sdca-sdw.c +++ b/sound/soc/codecs/rt712-sdca-sdw.c @@ -400,7 +400,7 @@ static const struct sdw_device_id rt712_sdca_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt712_sdca_id); -static int __maybe_unused rt712_sdca_dev_suspend(struct device *dev) +static int rt712_sdca_dev_suspend(struct device *dev) { struct rt712_sdca_priv *rt712 = dev_get_drvdata(dev); @@ -416,7 +416,7 @@ static int __maybe_unused rt712_sdca_dev_suspend(struct device *dev) return 0; } -static int __maybe_unused rt712_sdca_dev_system_suspend(struct device *dev) +static int rt712_sdca_dev_system_suspend(struct device *dev) { struct rt712_sdca_priv *rt712_sdca = dev_get_drvdata(dev); struct sdw_slave *slave = dev_to_sdw_dev(dev); @@ -448,7 +448,7 @@ static int __maybe_unused rt712_sdca_dev_system_suspend(struct device *dev) #define RT712_PROBE_TIMEOUT 5000 -static int __maybe_unused rt712_sdca_dev_resume(struct device *dev) +static int rt712_sdca_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt712_sdca_priv *rt712 = dev_get_drvdata(dev); @@ -488,14 +488,14 @@ static int __maybe_unused rt712_sdca_dev_resume(struct device *dev) } static const struct dev_pm_ops rt712_sdca_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt712_sdca_dev_system_suspend, rt712_sdca_dev_resume) - SET_RUNTIME_PM_OPS(rt712_sdca_dev_suspend, rt712_sdca_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt712_sdca_dev_system_suspend, rt712_sdca_dev_resume) + RUNTIME_PM_OPS(rt712_sdca_dev_suspend, rt712_sdca_dev_resume, NULL) }; static struct sdw_driver rt712_sdca_sdw_driver = { .driver = { .name = "rt712-sdca", - .pm = &rt712_sdca_pm, + .pm = pm_ptr(&rt712_sdca_pm), }, .probe = rt712_sdca_sdw_probe, .remove = rt712_sdca_sdw_remove, From patchwork Thu Mar 13 17:40:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015632 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CBA5198A2F for ; Thu, 13 Mar 2025 17:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887846; cv=none; b=Jx+3fgl4eGd+FPsNOn1oR3geTDXk0c4GW8F44lwKC2NC+hSlx8QmQF01Q3Rn5DkiqtB3Imzm89OLCPggDNszEsr+qCB5+D357TGTZ9HS8xlVPPcOUY67usrXYOJW3EGLjV37/IaH4xKsE6suz+7eGF9+rWpTq76y6aleOfHHOsM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887846; c=relaxed/simple; bh=z5KsK4ddGY051UCFN23kFfmy2cy/fqwvAT7ioyKJk7k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lBlqANiBJmBY99EaWf47uXHmrsPmz1QsPVF4xhjcfb0o9Gfbqq6Ct+mpIooWwTGb5if30Redoy6RuyXcRQzUPa6Frog3fyA3YJYqiYcFLuxUejf/VH+r8cCzrLvNK3ML2LMp6avnHITZT+J4g70mWfdcyzKDD84o1H8PuV73gXM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=u5KhHini; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=NaPl1J/A; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=u5KhHini; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=NaPl1J/A; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="u5KhHini"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="NaPl1J/A"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="u5KhHini"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="NaPl1J/A" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 19CF81F7A1; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZaALWPuLTHjwdVRxmpr9e75142YieH+vRKKSIlnxcf0=; b=u5KhHini5jMKboEeBl69gPbFmqDRAnnGuV1rdWU2xMN37f2o3BxhaK9gq7ifZBmri0ZfQy Ct+EqI5gnSg8B81dJ54Nn/u6PoOyxMWQ02n1Yraj/+wG89F4ho2pfSk+JHpMM+nyFmtp35 70v/u3YcWnboVyzrlEUN4yVVHQLWQsE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZaALWPuLTHjwdVRxmpr9e75142YieH+vRKKSIlnxcf0=; b=NaPl1J/AJMh4niNaNZsRlXwrI4bLkeuDaKBAHVaFNCp30UcLKH8arv/l8JT5CvDfYSOWB2 1O6i7THMjT+5yVAg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZaALWPuLTHjwdVRxmpr9e75142YieH+vRKKSIlnxcf0=; b=u5KhHini5jMKboEeBl69gPbFmqDRAnnGuV1rdWU2xMN37f2o3BxhaK9gq7ifZBmri0ZfQy Ct+EqI5gnSg8B81dJ54Nn/u6PoOyxMWQ02n1Yraj/+wG89F4ho2pfSk+JHpMM+nyFmtp35 70v/u3YcWnboVyzrlEUN4yVVHQLWQsE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZaALWPuLTHjwdVRxmpr9e75142YieH+vRKKSIlnxcf0=; b=NaPl1J/AJMh4niNaNZsRlXwrI4bLkeuDaKBAHVaFNCp30UcLKH8arv/l8JT5CvDfYSOWB2 1O6i7THMjT+5yVAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E89E9137BA; Thu, 13 Mar 2025 17:42:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id AN9wN+gY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:00 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 41/89] ASoC: rt715: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:46 +0100 Message-ID: <20250313174139.29942-42-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt715-sdca-sdw.c | 10 +++++----- sound/soc/codecs/rt715-sdw.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/rt715-sdca-sdw.c b/sound/soc/codecs/rt715-sdca-sdw.c index c8dabb9b16b5..ce7d8955efc3 100644 --- a/sound/soc/codecs/rt715-sdca-sdw.c +++ b/sound/soc/codecs/rt715-sdca-sdw.c @@ -205,7 +205,7 @@ static const struct sdw_device_id rt715_sdca_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt715_sdca_id); -static int __maybe_unused rt715_dev_suspend(struct device *dev) +static int rt715_dev_suspend(struct device *dev) { struct rt715_sdca_priv *rt715 = dev_get_drvdata(dev); @@ -222,7 +222,7 @@ static int __maybe_unused rt715_dev_suspend(struct device *dev) #define RT715_PROBE_TIMEOUT 5000 -static int __maybe_unused rt715_dev_resume(struct device *dev) +static int rt715_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt715_sdca_priv *rt715 = dev_get_drvdata(dev); @@ -263,14 +263,14 @@ static int __maybe_unused rt715_dev_resume(struct device *dev) } static const struct dev_pm_ops rt715_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt715_dev_suspend, rt715_dev_resume) - SET_RUNTIME_PM_OPS(rt715_dev_suspend, rt715_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt715_dev_suspend, rt715_dev_resume) + RUNTIME_PM_OPS(rt715_dev_suspend, rt715_dev_resume, NULL) }; static struct sdw_driver rt715_sdw_driver = { .driver = { .name = "rt715-sdca", - .pm = &rt715_pm, + .pm = pm_ptr(&rt715_pm), }, .probe = rt715_sdca_sdw_probe, .remove = rt715_sdca_sdw_remove, diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c index cd702574c84b..a3df4bbedf86 100644 --- a/sound/soc/codecs/rt715-sdw.c +++ b/sound/soc/codecs/rt715-sdw.c @@ -485,7 +485,7 @@ static const struct sdw_device_id rt715_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt715_id); -static int __maybe_unused rt715_dev_suspend(struct device *dev) +static int rt715_dev_suspend(struct device *dev) { struct rt715_priv *rt715 = dev_get_drvdata(dev); @@ -499,7 +499,7 @@ static int __maybe_unused rt715_dev_suspend(struct device *dev) #define RT715_PROBE_TIMEOUT 5000 -static int __maybe_unused rt715_dev_resume(struct device *dev) +static int rt715_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt715_priv *rt715 = dev_get_drvdata(dev); @@ -530,14 +530,14 @@ static int __maybe_unused rt715_dev_resume(struct device *dev) } static const struct dev_pm_ops rt715_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt715_dev_suspend, rt715_dev_resume) - SET_RUNTIME_PM_OPS(rt715_dev_suspend, rt715_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt715_dev_suspend, rt715_dev_resume) + RUNTIME_PM_OPS(rt715_dev_suspend, rt715_dev_resume, NULL) }; static struct sdw_driver rt715_sdw_driver = { .driver = { .name = "rt715", - .pm = &rt715_pm, + .pm = pm_ptr(&rt715_pm), }, .probe = rt715_sdw_probe, .remove = rt715_sdw_remove, From patchwork Thu Mar 13 17:40:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015634 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A983198A2F for ; Thu, 13 Mar 2025 17:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887852; cv=none; b=jUBX0YeTDfD5ewuRJk9YrmCX+16ynNuYDrW9y5xhSIY+IacSr8cTWIp7szCJPDLo1p730oC++go4dy8USorljN7YYE9NS65VygdfeKn6Fn02F6eLk4WBlL24x9KzrD3eMIlrM5K+LKar2FJYXX3VT9C1bqpAJG6JvozIOmkG1xY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887852; c=relaxed/simple; bh=YhX6FSRBwY8qpxBJI1qK6Cn7dWV7UBBJP4KQuAuVrJM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kRVPsrru63m/woBUzQIjP5smjZ0bryKqsQJy0NYparDS/qhilZceODIi1zcs56Okf2H59NJqyinskMyzD3HY4x4vKcp6oaFdudx8cbr6dtwWgUIFMUXY+r0lPZqmS2/GJtR0iMfakmB2aXCmd4iF9JidMRXLDfkD4vJubiApkcg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=xqZ+Y3XQ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=/LWWe1iX; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=xqZ+Y3XQ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=/LWWe1iX; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="xqZ+Y3XQ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="/LWWe1iX"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="xqZ+Y3XQ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="/LWWe1iX" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4D4A31F78D; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ey4wtYpPmBpYUWBiWObNd5v2CdA4TIK0VOF0M9I3g4Y=; b=xqZ+Y3XQkJdhY+4tsKBA46yd3tLNvvQ1sY0szJBkHqQf4eXM5leTXGoRgMJMET98udUrwi KaZ3pZoek54TWpWOGrNYoCqFBKwm29dJeCJvhMuICehP+5EXol8hA1gbcV97VZKw7mwJPe rg5DsrWN0lPngyVvO6ItVxydAydPmXo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ey4wtYpPmBpYUWBiWObNd5v2CdA4TIK0VOF0M9I3g4Y=; b=/LWWe1iXpR6JP33Ybe3kOBvtxSQQJwOSjg9D2B2KyXPj/WTIckiaztUWhz60TD/Ffr/7tQ XL7jy1+2PKpWxLBg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ey4wtYpPmBpYUWBiWObNd5v2CdA4TIK0VOF0M9I3g4Y=; b=xqZ+Y3XQkJdhY+4tsKBA46yd3tLNvvQ1sY0szJBkHqQf4eXM5leTXGoRgMJMET98udUrwi KaZ3pZoek54TWpWOGrNYoCqFBKwm29dJeCJvhMuICehP+5EXol8hA1gbcV97VZKw7mwJPe rg5DsrWN0lPngyVvO6ItVxydAydPmXo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ey4wtYpPmBpYUWBiWObNd5v2CdA4TIK0VOF0M9I3g4Y=; b=/LWWe1iXpR6JP33Ybe3kOBvtxSQQJwOSjg9D2B2KyXPj/WTIckiaztUWhz60TD/Ffr/7tQ XL7jy1+2PKpWxLBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 22034139D2; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id wDrHBukY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:01 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 42/89] ASoC: rt721: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:47 +0100 Message-ID: <20250313174139.29942-43-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt721-sdca-sdw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt721-sdca-sdw.c b/sound/soc/codecs/rt721-sdca-sdw.c index c71453da088a..582b47d69278 100644 --- a/sound/soc/codecs/rt721-sdca-sdw.c +++ b/sound/soc/codecs/rt721-sdca-sdw.c @@ -437,7 +437,7 @@ static const struct sdw_device_id rt721_sdca_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt721_sdca_id); -static int __maybe_unused rt721_sdca_dev_suspend(struct device *dev) +static int rt721_sdca_dev_suspend(struct device *dev) { struct rt721_sdca_priv *rt721 = dev_get_drvdata(dev); @@ -453,7 +453,7 @@ static int __maybe_unused rt721_sdca_dev_suspend(struct device *dev) return 0; } -static int __maybe_unused rt721_sdca_dev_system_suspend(struct device *dev) +static int rt721_sdca_dev_system_suspend(struct device *dev) { struct rt721_sdca_priv *rt721_sdca = dev_get_drvdata(dev); struct sdw_slave *slave = dev_to_sdw_dev(dev); @@ -485,7 +485,7 @@ static int __maybe_unused rt721_sdca_dev_system_suspend(struct device *dev) #define RT721_PROBE_TIMEOUT 5000 -static int __maybe_unused rt721_sdca_dev_resume(struct device *dev) +static int rt721_sdca_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt721_sdca_priv *rt721 = dev_get_drvdata(dev); @@ -524,15 +524,15 @@ static int __maybe_unused rt721_sdca_dev_resume(struct device *dev) } static const struct dev_pm_ops rt721_sdca_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt721_sdca_dev_system_suspend, rt721_sdca_dev_resume) - SET_RUNTIME_PM_OPS(rt721_sdca_dev_suspend, rt721_sdca_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt721_sdca_dev_system_suspend, rt721_sdca_dev_resume) + RUNTIME_PM_OPS(rt721_sdca_dev_suspend, rt721_sdca_dev_resume, NULL) }; static struct sdw_driver rt721_sdca_sdw_driver = { .driver = { .name = "rt721-sdca", .owner = THIS_MODULE, - .pm = &rt721_sdca_pm, + .pm = pm_ptr(&rt721_sdca_pm), }, .probe = rt721_sdca_sdw_probe, .remove = rt721_sdca_sdw_remove, From patchwork Thu Mar 13 17:40:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015636 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B92A31DE8B3 for ; Thu, 13 Mar 2025 17:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887858; cv=none; b=olpxZaN6E43UDh3fv46xA6Kz8NmJbG1I7qJe32iL7ilUvi0oDu+EvnSqlEA6pha0wVlfDjnB3koiVFC3H34kcK3gWDqge3MHl2v+mId6boWLzc71MzLSO3/suRD9qdSsG0k7u2kgB6Zx0O41zuUdCRHyZHjiFk62kB8vKuutkJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887858; c=relaxed/simple; bh=R+DVQYzGhnOeagk+Y5I7qAjWdI/lc++U82fnDNtOjHg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mZEd3Fq2rlOetYq2jeTpPEdH5xZhJUlnkQ2oQcOkBAFiQilnZK81h1v0/kab5Lwybk/4F7foNRhj2rXJztksE7sblAwCrU4NrEfdxH6XCBQMDNoUdOEfSjzpiBxqc4TddZNNpQz5Rcl8TrUtCtue50TRPxfhyvM1ycg0eCKBYD8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=IrYMMlTI; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ZTWOEUAR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=IrYMMlTI; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ZTWOEUAR; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="IrYMMlTI"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ZTWOEUAR"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="IrYMMlTI"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ZTWOEUAR" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8A3431F7A2; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IS4KPgdBD3ff/FphhPhROAdb9D3gS90At2Cq6vZ7XBY=; b=IrYMMlTIQ+4uHaB1kNCmQgJVR4Nsh/bkrtN2lfJUdJWLF+bKzObHLp3k6TOCKFwtgccNwI gMqWT0weW3PNiu7UjZigKSu1V7Ohu/8lxm25B5um7rh3/sNZpyS9XPba1mHfMAO75wpWwN LELPCqhu+8V+uNXPUP/sfb6WUrMN+KI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IS4KPgdBD3ff/FphhPhROAdb9D3gS90At2Cq6vZ7XBY=; b=ZTWOEUARLA44Ga5ig6bdoJ6Bb0Mvyej1Bk6ZKQ/xF+of/FkqvDPf0vahmaIysc7QQgLdjH fNpk9nrU8zr3IvAQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=IrYMMlTI; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=ZTWOEUAR DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IS4KPgdBD3ff/FphhPhROAdb9D3gS90At2Cq6vZ7XBY=; b=IrYMMlTIQ+4uHaB1kNCmQgJVR4Nsh/bkrtN2lfJUdJWLF+bKzObHLp3k6TOCKFwtgccNwI gMqWT0weW3PNiu7UjZigKSu1V7Ohu/8lxm25B5um7rh3/sNZpyS9XPba1mHfMAO75wpWwN LELPCqhu+8V+uNXPUP/sfb6WUrMN+KI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IS4KPgdBD3ff/FphhPhROAdb9D3gS90At2Cq6vZ7XBY=; b=ZTWOEUARLA44Ga5ig6bdoJ6Bb0Mvyej1Bk6ZKQ/xF+of/FkqvDPf0vahmaIysc7QQgLdjH fNpk9nrU8zr3IvAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 552A7137BA; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ACxXE+kY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:01 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 43/89] ASoC: rt722: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:48 +0100 Message-ID: <20250313174139.29942-44-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 8A3431F7A2 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt722-sdca-sdw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c index 543cb32c2463..11e2e8f68a98 100644 --- a/sound/soc/codecs/rt722-sdca-sdw.c +++ b/sound/soc/codecs/rt722-sdca-sdw.c @@ -430,7 +430,7 @@ static const struct sdw_device_id rt722_sdca_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt722_sdca_id); -static int __maybe_unused rt722_sdca_dev_suspend(struct device *dev) +static int rt722_sdca_dev_suspend(struct device *dev) { struct rt722_sdca_priv *rt722 = dev_get_drvdata(dev); @@ -445,7 +445,7 @@ static int __maybe_unused rt722_sdca_dev_suspend(struct device *dev) return 0; } -static int __maybe_unused rt722_sdca_dev_system_suspend(struct device *dev) +static int rt722_sdca_dev_system_suspend(struct device *dev) { struct rt722_sdca_priv *rt722_sdca = dev_get_drvdata(dev); struct sdw_slave *slave = dev_to_sdw_dev(dev); @@ -477,7 +477,7 @@ static int __maybe_unused rt722_sdca_dev_system_suspend(struct device *dev) #define RT722_PROBE_TIMEOUT 5000 -static int __maybe_unused rt722_sdca_dev_resume(struct device *dev) +static int rt722_sdca_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt722_sdca_priv *rt722 = dev_get_drvdata(dev); @@ -514,14 +514,14 @@ static int __maybe_unused rt722_sdca_dev_resume(struct device *dev) } static const struct dev_pm_ops rt722_sdca_pm = { - SET_SYSTEM_SLEEP_PM_OPS(rt722_sdca_dev_system_suspend, rt722_sdca_dev_resume) - SET_RUNTIME_PM_OPS(rt722_sdca_dev_suspend, rt722_sdca_dev_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rt722_sdca_dev_system_suspend, rt722_sdca_dev_resume) + RUNTIME_PM_OPS(rt722_sdca_dev_suspend, rt722_sdca_dev_resume, NULL) }; static struct sdw_driver rt722_sdca_sdw_driver = { .driver = { .name = "rt722-sdca", - .pm = &rt722_sdca_pm, + .pm = pm_ptr(&rt722_sdca_pm), }, .probe = rt722_sdca_sdw_probe, .remove = rt722_sdca_sdw_remove, From patchwork Thu Mar 13 17:40:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015638 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E278E1D86F7 for ; Thu, 13 Mar 2025 17:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887864; cv=none; b=rwooOPA96wVrN5bfKasYDYZdV9Bh0di9tWvIhrWbbBShc3upvHE2qSkBdCYG6avTLmKWYduBQf2eUuvQ4kM/+VhIWCYnui7U2amENPvuVFcKwn+jUX4SpdVlOIvGU2sgzea/MYCPFKHvExO3Iqk6WkmJ2tjyvVWtvbncBXPtliI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887864; c=relaxed/simple; bh=0HFHK+hM3hI/HJpDWjv+DM/c5ioMHsHDg2XNYGUBoug=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ncaFBNj9OaKx1UgH9N+WXNVhBgD4ECYDLaYLGQYnLA/uMEFSfdlsHMCWtDwstOy2ihc1uc/AargcFgaVnnupCzONMKInFexsztuUy//dpv6gxd96WP02aZGEpN1qb8JljquQFmYyzNaxRRVAbLhh3fXq5ez38X/6uiPczDsQr7o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Rkj4+Osa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=j7LeHebF; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Rkj4+Osa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=j7LeHebF; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Rkj4+Osa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="j7LeHebF"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Rkj4+Osa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="j7LeHebF" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AE5401F7A3; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M2k6Vt6Q57OliwEE3khZVWGRv7GOozX//jklQTrhxKY=; b=Rkj4+Osa2Bhuwgh9gR+pQg8pW0K441yA16D5ploEzu3vm3CMW+1crb/aBnSjQXJDZqurSA 80Cexoi0adkQNklCkt+ZmVOmmOXWBTkonaEY0TcBoZnn2d1N16Z1YoVleuvNWE9SHjdIJ+ Y947EXdfIwCaab5vSjO3cNk+1Q0XAwg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M2k6Vt6Q57OliwEE3khZVWGRv7GOozX//jklQTrhxKY=; b=j7LeHebFIIWGYp+Sh1oeXXu4oCCB0faI1fVZMN+5TImxu2SwJ+TbFs2T8UDqw8WLEycQCV TfKmcNnWA/DE3vAA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M2k6Vt6Q57OliwEE3khZVWGRv7GOozX//jklQTrhxKY=; b=Rkj4+Osa2Bhuwgh9gR+pQg8pW0K441yA16D5ploEzu3vm3CMW+1crb/aBnSjQXJDZqurSA 80Cexoi0adkQNklCkt+ZmVOmmOXWBTkonaEY0TcBoZnn2d1N16Z1YoVleuvNWE9SHjdIJ+ Y947EXdfIwCaab5vSjO3cNk+1Q0XAwg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M2k6Vt6Q57OliwEE3khZVWGRv7GOozX//jklQTrhxKY=; b=j7LeHebFIIWGYp+Sh1oeXXu4oCCB0faI1fVZMN+5TImxu2SwJ+TbFs2T8UDqw8WLEycQCV TfKmcNnWA/DE3vAA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8648E139D2; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id GGguH+kY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:01 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 44/89] ASoC: rt9120: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:49 +0100 Message-ID: <20250313174139.29942-45-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rt9120.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rt9120.c b/sound/soc/codecs/rt9120.c index 733a7d130a95..97f56af25577 100644 --- a/sound/soc/codecs/rt9120.c +++ b/sound/soc/codecs/rt9120.c @@ -590,7 +590,7 @@ static void rt9120_remove(struct i2c_client *i2c) pm_runtime_set_suspended(&i2c->dev); } -static int __maybe_unused rt9120_runtime_suspend(struct device *dev) +static int rt9120_runtime_suspend(struct device *dev) { struct rt9120_data *data = dev_get_drvdata(dev); @@ -603,7 +603,7 @@ static int __maybe_unused rt9120_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused rt9120_runtime_resume(struct device *dev) +static int rt9120_runtime_resume(struct device *dev) { struct rt9120_data *data = dev_get_drvdata(dev); @@ -618,7 +618,7 @@ static int __maybe_unused rt9120_runtime_resume(struct device *dev) } static const struct dev_pm_ops rt9120_pm_ops = { - SET_RUNTIME_PM_OPS(rt9120_runtime_suspend, rt9120_runtime_resume, NULL) + RUNTIME_PM_OPS(rt9120_runtime_suspend, rt9120_runtime_resume, NULL) }; static const struct of_device_id __maybe_unused rt9120_device_table[] = { @@ -631,7 +631,7 @@ static struct i2c_driver rt9120_driver = { .driver = { .name = "rt9120", .of_match_table = rt9120_device_table, - .pm = &rt9120_pm_ops, + .pm = pm_ptr(&rt9120_pm_ops), }, .probe = rt9120_probe, .remove = rt9120_remove, From patchwork Thu Mar 13 17:40:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015640 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B71DA1E3DE5 for ; Thu, 13 Mar 2025 17:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887870; cv=none; b=a2wYaooMAMz6PbR+5NYNYsVhil2rSnEMwnCTucTfWheT5YPFYbMNo0cPXZn8uXCIQQWBcLra6lEP570kmfJ61fBlPP+a/y2apARQZ6oPEG8NUFilcp6Pb41R7LCBmSrkIaGBQMhEzzm9CI+dluxy6GtKX1d7vg1CAcDobbH1chY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887870; c=relaxed/simple; bh=Rco2S2QBD/VJqA4HWtVariCutQ6fg0MzStVYGuh6sxU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ryzRYqBCKRm4D2wdw5vmWDsoRoBzMnFM2XuXsoKpmjnqHCOatQPD6TAyXwL+EsnKcHaf06CGYbhBpUNNBMRrcXSnDEt+sSmX+jnDsOKViHQqCOoZzcYZl0iD+MQbpplX2T3tdna+8Z/wpHmzG9YIE65rTJlVOp82IOVkNb2xL4Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rB2DySJg; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=baY+IBnG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rB2DySJg; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=baY+IBnG; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rB2DySJg"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="baY+IBnG"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rB2DySJg"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="baY+IBnG" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D92811F7A5; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hL0nQQUe4ce7x9Xg03AGwmSR2V61+9O6XGg7+eE/4oU=; b=rB2DySJgX5dytgVm32CQ+3Dx7HK7+SIOsUEwFimVvWOJghScyU4p4xsNUJ15VLUtc6QZf2 G8O36rxW9gxSCn6NDJn/W/zUaVPI/PhFSQOfZ5W5TxFnpHyVOjdHh4yqstfwBBT2OW4EEl u4PnSeHszqNL1p0P+G5kENUVnu08MM0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hL0nQQUe4ce7x9Xg03AGwmSR2V61+9O6XGg7+eE/4oU=; b=baY+IBnGxkD6QLpVAK2AQ1prNX1iMYw4V680Khox5dYP0CY6hDcHM+GDv154wH1FnfxReT RTLMnKRZOUw2YnAw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hL0nQQUe4ce7x9Xg03AGwmSR2V61+9O6XGg7+eE/4oU=; b=rB2DySJgX5dytgVm32CQ+3Dx7HK7+SIOsUEwFimVvWOJghScyU4p4xsNUJ15VLUtc6QZf2 G8O36rxW9gxSCn6NDJn/W/zUaVPI/PhFSQOfZ5W5TxFnpHyVOjdHh4yqstfwBBT2OW4EEl u4PnSeHszqNL1p0P+G5kENUVnu08MM0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887721; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hL0nQQUe4ce7x9Xg03AGwmSR2V61+9O6XGg7+eE/4oU=; b=baY+IBnGxkD6QLpVAK2AQ1prNX1iMYw4V680Khox5dYP0CY6hDcHM+GDv154wH1FnfxReT RTLMnKRZOUw2YnAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B46B313A24; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OO3IKukY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:01 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Oder Chiou Subject: [PATCH 45/89] ASoC: rtq9128: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:50 +0100 Message-ID: <20250313174139.29942-46-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS(), which allows us dropping ugly __maybe_unsed attributes. Merely a cleanup, there should be no actual code change. Cc: Oder Chiou Signed-off-by: Takashi Iwai --- sound/soc/codecs/rtq9128.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c index aa3eadecd974..391cc03d687f 100644 --- a/sound/soc/codecs/rtq9128.c +++ b/sound/soc/codecs/rtq9128.c @@ -729,7 +729,7 @@ static int rtq9128_probe(struct i2c_client *i2c) return devm_snd_soc_register_component(dev, &rtq9128_comp_driver, &rtq9128_dai, 1); } -static int __maybe_unused rtq9128_pm_runtime_suspend(struct device *dev) +static int rtq9128_pm_runtime_suspend(struct device *dev) { struct rtq9128_data *data = dev_get_drvdata(dev); struct regmap *regmap = dev_get_regmap(dev, NULL); @@ -746,7 +746,7 @@ static int __maybe_unused rtq9128_pm_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused rtq9128_pm_runtime_resume(struct device *dev) +static int rtq9128_pm_runtime_resume(struct device *dev) { struct rtq9128_data *data = dev_get_drvdata(dev); struct regmap *regmap = dev_get_regmap(dev, NULL); @@ -764,8 +764,8 @@ static int __maybe_unused rtq9128_pm_runtime_resume(struct device *dev) return regcache_sync(regmap); } -static const struct dev_pm_ops __maybe_unused rtq9128_pm_ops = { - SET_RUNTIME_PM_OPS(rtq9128_pm_runtime_suspend, rtq9128_pm_runtime_resume, NULL) +static const struct dev_pm_ops rtq9128_pm_ops = { + RUNTIME_PM_OPS(rtq9128_pm_runtime_suspend, rtq9128_pm_runtime_resume, NULL) }; static const struct of_device_id rtq9128_device_table[] = { From patchwork Thu Mar 13 17:40:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015631 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA30B1C84A8 for ; Thu, 13 Mar 2025 17:44:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887844; cv=none; b=QmhUsMmJQ1Nv12d3OiSQXRbBkRqkh0cnnEsLNVUdKfW89kck2fuPBga0wstP8lI+/ZYYXeaRaCRogCHNnAZlccpU79DVv7h/RJBrwZaVvt4WR/aKQq0wwq7MdJL6iyzS2y/RZeQaZCZ4vfmCaE6KOxHzK/rCI97n00OAwZ4ooxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887844; c=relaxed/simple; bh=CErNXOEtx2M9T3Tqwk7XB1zRUf81EBR+6WBQWTSohso=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OTQB3dS6d8pYmDn3T3dra+a7tDyGUnCaR/Q4XX1iRCRqvE0yMCD3BT3RKKTOWfND5XePb85ZprfiuF63I604vx7QzjdUu3aEpL8jEm5WtnQkxc1ryjba6WhxcGYMJuffvALzrdqaDe5UDuLWTSm/G/aGatQXJV5YgJk/RFoC0Ho= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=JSJMv1b6; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ThcXMkyA; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=JSJMv1b6; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ThcXMkyA; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="JSJMv1b6"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ThcXMkyA"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="JSJMv1b6"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ThcXMkyA" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1CF7F211CB; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yb5BTuvGpPWIrTgBZyFM7MuZBtD3RRV0rwsBmKoYnHg=; b=JSJMv1b67cJRhV+Vg0U9HBZMFP3DcDQ2X5haWDBm1x5+84WMyjoEexaFDj1eb/cpcisczh qK9SeCjxWa2qu3dN63p4XRIDSzMt/pUlwN4gugAQHBo95hGTNfY9iAY7z0QC1Dw0R4qHLZ CcxB2usbzcqc1jpeO3TG/MMYmxDUhZI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yb5BTuvGpPWIrTgBZyFM7MuZBtD3RRV0rwsBmKoYnHg=; b=ThcXMkyAQxbARUC2n5yoHgulOyS1QPTzw+yvCdIb4yZZ7dFYypt3CsetM8ouuW4mAx+s/u tog74qOa/hFwfADA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yb5BTuvGpPWIrTgBZyFM7MuZBtD3RRV0rwsBmKoYnHg=; b=JSJMv1b67cJRhV+Vg0U9HBZMFP3DcDQ2X5haWDBm1x5+84WMyjoEexaFDj1eb/cpcisczh qK9SeCjxWa2qu3dN63p4XRIDSzMt/pUlwN4gugAQHBo95hGTNfY9iAY7z0QC1Dw0R4qHLZ CcxB2usbzcqc1jpeO3TG/MMYmxDUhZI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yb5BTuvGpPWIrTgBZyFM7MuZBtD3RRV0rwsBmKoYnHg=; b=ThcXMkyAQxbARUC2n5yoHgulOyS1QPTzw+yvCdIb4yZZ7dFYypt3CsetM8ouuW4mAx+s/u tog74qOa/hFwfADA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E0636137BA; Thu, 13 Mar 2025 17:42:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YJZHNekY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:01 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Shenghao Ding , Kevin Lu , Baojun Xu Subject: [PATCH 46/89] ASoC: tas2552: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:51 +0100 Message-ID: <20250313174139.29942-47-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Shenghao Ding Cc: Kevin Lu Cc: Baojun Xu Signed-off-by: Takashi Iwai --- sound/soc/codecs/tas2552.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index 684d52ec6600..b56dd279d90a 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -138,7 +138,6 @@ static const struct snd_soc_dapm_route tas2552_audio_map[] = { {"ASI OUT", NULL, "DMIC"} }; -#ifdef CONFIG_PM static void tas2552_sw_shutdown(struct tas2552_data *tas2552, int sw_shutdown) { u8 cfg1_reg = 0; @@ -152,7 +151,6 @@ static void tas2552_sw_shutdown(struct tas2552_data *tas2552, int sw_shutdown) snd_soc_component_update_bits(tas2552->component, TAS2552_CFG_1, TAS2552_SWS, cfg1_reg); } -#endif static int tas2552_setup_pll(struct snd_soc_component *component, struct snd_pcm_hw_params *params) @@ -480,7 +478,6 @@ static int tas2552_mute(struct snd_soc_dai *dai, int mute, int direction) return 0; } -#ifdef CONFIG_PM static int tas2552_runtime_suspend(struct device *dev) { struct tas2552_data *tas2552 = dev_get_drvdata(dev); @@ -508,11 +505,9 @@ static int tas2552_runtime_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops tas2552_pm = { - SET_RUNTIME_PM_OPS(tas2552_runtime_suspend, tas2552_runtime_resume, - NULL) + RUNTIME_PM_OPS(tas2552_runtime_suspend, tas2552_runtime_resume, NULL) }; static const struct snd_soc_dai_ops tas2552_speaker_dai_ops = { @@ -768,7 +763,7 @@ static struct i2c_driver tas2552_i2c_driver = { .driver = { .name = "tas2552", .of_match_table = of_match_ptr(tas2552_of_match), - .pm = &tas2552_pm, + .pm = pm_ptr(&tas2552_pm), }, .probe = tas2552_probe, .remove = tas2552_i2c_remove, From patchwork Thu Mar 13 17:40:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015633 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B51081D5146 for ; Thu, 13 Mar 2025 17:44:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887851; cv=none; b=rTuTJHN5Fakixt4WYtD0t3u90YTuByFkW3/UIZ9mXfiAgDb/XipWU30MsaUJmCrGIn3CQsLi36V2+X748LObS3SvSEQVtbxcBQxTLAFON8rBWLy1OZ4juxx9fU8KjbblfF+EFM2Ryo+Rb+iq+TeSxJelrB+8RJRX/j3DhCcpvk0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887851; c=relaxed/simple; bh=Bl7uUD4oRXnXKCc2cf1V48p1tZF4MO4jUGlzF++GSf8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=baEJAeJ4k/NozLAFdzHmDmqXdJLyuonaTJbjZO8IfL1WCLxY2u+AxKBMteGGMRPJRyBX+CDMZlhvPfjBCLvLTa3dhkpprknmLvoBE7oQ0yPr+5qsQp9R68ij7F4hf1vFHSUY01yk2g931L505FpZcXN+Y1wXIspkmA8+YGYjW8U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=AaGebP72; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4Cr9uzmp; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=AaGebP72; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4Cr9uzmp; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AaGebP72"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4Cr9uzmp"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AaGebP72"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4Cr9uzmp" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 45391211D1; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gksWPjFGo5eKgOSoouF97EUSTuS9GyPt2k9sER5SUgw=; b=AaGebP72uE2qSNQR9yZvbfmR+ZDOFMSEin/Rz3rX8OPOOjINHv1HM3KZceUImDhPrWPlgA xkq7+AjPlZ3prfhlXIGwXZB/D82AowBszfmx/0/Syimnv7LQZdxmVNbtBsejSxhC4bpi3P vCi3YrDgjhmCdJTWty8VxJKQnOZLGvU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gksWPjFGo5eKgOSoouF97EUSTuS9GyPt2k9sER5SUgw=; b=4Cr9uzmp9bJgLsO9JjQDq8R26Ggj6a9/w4epi5DEgtIjXK6+Eq3SENHOf7tMh/7vpRqchr yoqiri9gfR+o0fDA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gksWPjFGo5eKgOSoouF97EUSTuS9GyPt2k9sER5SUgw=; b=AaGebP72uE2qSNQR9yZvbfmR+ZDOFMSEin/Rz3rX8OPOOjINHv1HM3KZceUImDhPrWPlgA xkq7+AjPlZ3prfhlXIGwXZB/D82AowBszfmx/0/Syimnv7LQZdxmVNbtBsejSxhC4bpi3P vCi3YrDgjhmCdJTWty8VxJKQnOZLGvU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gksWPjFGo5eKgOSoouF97EUSTuS9GyPt2k9sER5SUgw=; b=4Cr9uzmp9bJgLsO9JjQDq8R26Ggj6a9/w4epi5DEgtIjXK6+Eq3SENHOf7tMh/7vpRqchr yoqiri9gfR+o0fDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 242A4139D2; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id +C2RB+oY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:02 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 47/89] ASoC: ts3a227e: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:40:52 +0100 Message-ID: <20250313174139.29942-48-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/ts3a227e.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c index b9eb59e3bfa0..5ce0db9326fd 100644 --- a/sound/soc/codecs/ts3a227e.c +++ b/sound/soc/codecs/ts3a227e.c @@ -399,7 +399,6 @@ static int ts3a227e_i2c_probe(struct i2c_client *i2c) return 0; } -#ifdef CONFIG_PM_SLEEP static int ts3a227e_suspend(struct device *dev) { struct ts3a227e *ts3a227e = dev_get_drvdata(dev); @@ -419,10 +418,9 @@ static int ts3a227e_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops ts3a227e_pm = { - SET_SYSTEM_SLEEP_PM_OPS(ts3a227e_suspend, ts3a227e_resume) + SYSTEM_SLEEP_PM_OPS(ts3a227e_suspend, ts3a227e_resume) }; static const struct i2c_device_id ts3a227e_i2c_ids[] = { @@ -450,7 +448,7 @@ MODULE_DEVICE_TABLE(acpi, ts3a227e_acpi_match); static struct i2c_driver ts3a227e_driver = { .driver = { .name = "ts3a227e", - .pm = &ts3a227e_pm, + .pm = pm_ptr(&ts3a227e_pm), .of_match_table = of_match_ptr(ts3a227e_of_match), .acpi_match_table = ACPI_PTR(ts3a227e_acpi_match), }, From patchwork Thu Mar 13 17:40:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015642 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E74D1D89E3 for ; Thu, 13 Mar 2025 17:44:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887875; cv=none; b=jK9esBBd3vmwbwuEY9zevTAs+20+U1oBEhGn6I6RyO6g0akfrUWe/319i19yGDABUiBxRWzdaUte91rtTHI0l31bKftj8vC4mT72Om26lg9+2VWMuqCyTied/sP8B7B8fcfFifu2OA+0/loGpPbhoJpw5ewt30sWyk3v0q+NSUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887875; c=relaxed/simple; bh=7lFGrMeR9BeZJi16vlYeONBYirmcKgKF00kUl3WrOsU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mZCwuXn/CJq2TsLORafBDHOyBs4wteG6jHzYjafah3tUgXVRfW+AhDzYCpnhGmkETzOewytG1pyEr4zVmrnRB3I74g+Ierb06MPC5C2HPscewEeWtHQddR3en/pSF71YAy/UA+axVwewDX/twxOxzj67ea/2v9NxkvS5ZADRROs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=axUJTaNy; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=OnpTz9em; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=axUJTaNy; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=OnpTz9em; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="axUJTaNy"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="OnpTz9em"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="axUJTaNy"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="OnpTz9em" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6C8171F769; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wo47St6usJX1GRC87w178927MTe+mwWSyvbRTSI/IA0=; b=axUJTaNyPB3mBmZXq1gzGegBbJGcoGIMo3fmIc4HIBGgDIaprogpsGhA8w4bwr2MVFUMN/ gXSA4OyOwPfw33vkitSJfo9/Cn9GJ70ato3ogCWck29VS/UjTsvQi0lMY8PmPMAzouzwKQ wUcPje5fmo1AHEhjdjOuKgNZxFTRjKw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wo47St6usJX1GRC87w178927MTe+mwWSyvbRTSI/IA0=; b=OnpTz9emC5UfddxPGaBvHshs6nSCc1h2jZiwF0QdNvsoW9RT5nfsoZ0ezLMRdwAOksMzKr LDXZ7ijj6iLp6VDg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wo47St6usJX1GRC87w178927MTe+mwWSyvbRTSI/IA0=; b=axUJTaNyPB3mBmZXq1gzGegBbJGcoGIMo3fmIc4HIBGgDIaprogpsGhA8w4bwr2MVFUMN/ gXSA4OyOwPfw33vkitSJfo9/Cn9GJ70ato3ogCWck29VS/UjTsvQi0lMY8PmPMAzouzwKQ wUcPje5fmo1AHEhjdjOuKgNZxFTRjKw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wo47St6usJX1GRC87w178927MTe+mwWSyvbRTSI/IA0=; b=OnpTz9emC5UfddxPGaBvHshs6nSCc1h2jZiwF0QdNvsoW9RT5nfsoZ0ezLMRdwAOksMzKr LDXZ7ijj6iLp6VDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4BB61137BA; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2PQSEeoY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:02 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 48/89] ASoC: wcd937x: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:53 +0100 Message-ID: <20250313174139.29942-49-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/wcd937x-sdw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd937x-sdw.c b/sound/soc/codecs/wcd937x-sdw.c index 4891fa0c963f..1bfe7383b311 100644 --- a/sound/soc/codecs/wcd937x-sdw.c +++ b/sound/soc/codecs/wcd937x-sdw.c @@ -1124,7 +1124,7 @@ static const struct sdw_device_id wcd9370_slave_id[] = { }; MODULE_DEVICE_TABLE(sdw, wcd9370_slave_id); -static int __maybe_unused wcd937x_sdw_runtime_suspend(struct device *dev) +static int wcd937x_sdw_runtime_suspend(struct device *dev) { struct wcd937x_sdw_priv *wcd = dev_get_drvdata(dev); @@ -1136,7 +1136,7 @@ static int __maybe_unused wcd937x_sdw_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused wcd937x_sdw_runtime_resume(struct device *dev) +static int wcd937x_sdw_runtime_resume(struct device *dev) { struct wcd937x_sdw_priv *wcd = dev_get_drvdata(dev); @@ -1149,7 +1149,7 @@ static int __maybe_unused wcd937x_sdw_runtime_resume(struct device *dev) } static const struct dev_pm_ops wcd937x_sdw_pm_ops = { - SET_RUNTIME_PM_OPS(wcd937x_sdw_runtime_suspend, wcd937x_sdw_runtime_resume, NULL) + RUNTIME_PM_OPS(wcd937x_sdw_runtime_suspend, wcd937x_sdw_runtime_resume, NULL) }; static struct sdw_driver wcd9370_codec_driver = { @@ -1159,7 +1159,7 @@ static struct sdw_driver wcd9370_codec_driver = { .id_table = wcd9370_slave_id, .driver = { .name = "wcd9370-codec", - .pm = &wcd937x_sdw_pm_ops, + .pm = pm_ptr(&wcd937x_sdw_pm_ops), } }; module_sdw_driver(wcd9370_codec_driver); From patchwork Thu Mar 13 17:40:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015644 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E09721DB933 for ; Thu, 13 Mar 2025 17:44:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887882; cv=none; b=EB9IMX1ifo5nnjVp0uy3a78ZjbKffboNQwmd9qmU+BCRBjWgKd+SATiUl11VfjzeH692fd9ane7hJ/f6jVb7Zy1miY4xKqw7x/am0Hnj5yaLAManWda14mCAFnMfwzWmTXNIsYCYPKNMk2O7d31OQ4CHZCH0VlyN0szX2qS+rjs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887882; c=relaxed/simple; bh=cgH/eXQT0VMLzdspxPDzYZc+tC1g/FTv3+u/ICVgV8g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZHAKom39Bilu4ld1rMp+exjf0Y+8Vw1oOfVhLSJtBzzOsG6YAI978fpv0z03FB0QJzh+JnP6m6dQjghC78iMSGsZN0Bdq1URqCZHVt7XOzWUOud1rRGmzaACKHFdxafyrghGg7o5UwoXlCfmaV73kZ359Bo8DH/BdJ68br7IpCw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rYDUhkM9; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=K08BJBQP; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rYDUhkM9; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=K08BJBQP; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rYDUhkM9"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="K08BJBQP"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rYDUhkM9"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="K08BJBQP" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 93A5C1F7A6; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sVEmhR/KFVRzrqPQeH4C6U89d+Umb6IJ2OqQYCx+JF8=; b=rYDUhkM9MmlVmcNEZEH1RnQ5BxyxRinZ5SJkH126fDhsXrzpKYzS7ADm3agcaup/2hYQyi KgpbmzQAeO5ur8vZ9hwYUNi/4kHV5hnEI2Dmhs/kegtoF5xE4/M2H1qgWPZIFuGoqlOMK9 HMOfEyxEhkKCMkcu4LAFiqZs9Mb1Sgg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sVEmhR/KFVRzrqPQeH4C6U89d+Umb6IJ2OqQYCx+JF8=; b=K08BJBQP2CW3KN7T7s9XDg6c/qZaUuNXlFqDIP0LP58Md6j0alHAJwVdDKXPm0gzWxldb0 fpct4VTOtBbWPSBA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sVEmhR/KFVRzrqPQeH4C6U89d+Umb6IJ2OqQYCx+JF8=; b=rYDUhkM9MmlVmcNEZEH1RnQ5BxyxRinZ5SJkH126fDhsXrzpKYzS7ADm3agcaup/2hYQyi KgpbmzQAeO5ur8vZ9hwYUNi/4kHV5hnEI2Dmhs/kegtoF5xE4/M2H1qgWPZIFuGoqlOMK9 HMOfEyxEhkKCMkcu4LAFiqZs9Mb1Sgg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sVEmhR/KFVRzrqPQeH4C6U89d+Umb6IJ2OqQYCx+JF8=; b=K08BJBQP2CW3KN7T7s9XDg6c/qZaUuNXlFqDIP0LP58Md6j0alHAJwVdDKXPm0gzWxldb0 fpct4VTOtBbWPSBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 74597139D2; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WF3QGuoY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:02 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 49/89] ASoC: wcd938x: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:54 +0100 Message-ID: <20250313174139.29942-50-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/wcd938x-sdw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd938x-sdw.c b/sound/soc/codecs/wcd938x-sdw.c index 4e2ae542cee3..cabddadc90ef 100644 --- a/sound/soc/codecs/wcd938x-sdw.c +++ b/sound/soc/codecs/wcd938x-sdw.c @@ -1311,7 +1311,7 @@ static const struct sdw_device_id wcd9380_slave_id[] = { }; MODULE_DEVICE_TABLE(sdw, wcd9380_slave_id); -static int __maybe_unused wcd938x_sdw_runtime_suspend(struct device *dev) +static int wcd938x_sdw_runtime_suspend(struct device *dev) { struct wcd938x_sdw_priv *wcd = dev_get_drvdata(dev); @@ -1323,7 +1323,7 @@ static int __maybe_unused wcd938x_sdw_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused wcd938x_sdw_runtime_resume(struct device *dev) +static int wcd938x_sdw_runtime_resume(struct device *dev) { struct wcd938x_sdw_priv *wcd = dev_get_drvdata(dev); @@ -1338,7 +1338,7 @@ static int __maybe_unused wcd938x_sdw_runtime_resume(struct device *dev) } static const struct dev_pm_ops wcd938x_sdw_pm_ops = { - SET_RUNTIME_PM_OPS(wcd938x_sdw_runtime_suspend, wcd938x_sdw_runtime_resume, NULL) + RUNTIME_PM_OPS(wcd938x_sdw_runtime_suspend, wcd938x_sdw_runtime_resume, NULL) }; @@ -1349,7 +1349,7 @@ static struct sdw_driver wcd9380_codec_driver = { .id_table = wcd9380_slave_id, .driver = { .name = "wcd9380-codec", - .pm = &wcd938x_sdw_pm_ops, + .pm = pm_ptr(&wcd938x_sdw_pm_ops), } }; module_sdw_driver(wcd9380_codec_driver); From patchwork Thu Mar 13 17:40:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015635 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B65101DDC2A for ; Thu, 13 Mar 2025 17:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887857; cv=none; b=VGIo2xRxtN/usUhQH70fwdF+MWQxklnQrLbJgN9cIW8FBB7YfQtnMOvhlQaWrYsHpArkj1yirhe7IBpSGG15ye/yckSblBRpnOnNRdNcijy0rk/352oeyP6NGSRVEOsVHSNVcYIOL/i/gSKVbKngWfhWEOapLALln2CWRteLxyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887857; c=relaxed/simple; bh=UFghHy2AClwzjwoWANI5ykIdw4ypHVvv6APKit31yWM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TaMmRKRO2Uk+OIxhrzDSk2tOny5MG+HP6eQTMeAuigtmTz3NohWXQfPsgVOvK56rexkh+6nC9/t6/8m8QmtG70YbUmkUxeuh62x477SmZ71qoEcaPlUtWxEBmO5EmkfKn7s8uEIiygFhCM8LJWIQI2uIzO8Mv6LSjrpQNtnRFXc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=yZK5LfDs; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RN7LXyji; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=yZK5LfDs; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RN7LXyji; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="yZK5LfDs"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RN7LXyji"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="yZK5LfDs"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RN7LXyji" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C5E7F211C7; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KCRmmGCW/ivrFeOIU3GLuyKJc6iNw30D6Qh4IoN+PW4=; b=yZK5LfDsQRZ+qK/tObAKhzzhNXiyQd+YdH65B17fmCdV1OLnBcfKC5ttZXkP5zj3V/m5/0 2hK+mYMsYAs35H8LinblsIitgjSzxpSVHn6GVkoxy/ZZrSf2rS/3Xr2Zux4Q7yq3J5zg2d S4bJThMLKurpvt6ZVHlp5yrdMFWcNlU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KCRmmGCW/ivrFeOIU3GLuyKJc6iNw30D6Qh4IoN+PW4=; b=RN7LXyjiYUbRhTIlbOJ67r5plNmrJZlS//uyso1eS/srwHA9Qa3KFy0tydfLe6fvd3pepy DN0OJrLfN7AcSRAQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KCRmmGCW/ivrFeOIU3GLuyKJc6iNw30D6Qh4IoN+PW4=; b=yZK5LfDsQRZ+qK/tObAKhzzhNXiyQd+YdH65B17fmCdV1OLnBcfKC5ttZXkP5zj3V/m5/0 2hK+mYMsYAs35H8LinblsIitgjSzxpSVHn6GVkoxy/ZZrSf2rS/3Xr2Zux4Q7yq3J5zg2d S4bJThMLKurpvt6ZVHlp5yrdMFWcNlU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KCRmmGCW/ivrFeOIU3GLuyKJc6iNw30D6Qh4IoN+PW4=; b=RN7LXyjiYUbRhTIlbOJ67r5plNmrJZlS//uyso1eS/srwHA9Qa3KFy0tydfLe6fvd3pepy DN0OJrLfN7AcSRAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9B18F137BA; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0JybJOoY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:02 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 50/89] ASoC: wcd939x: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:55 +0100 Message-ID: <20250313174139.29942-51-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/codecs/wcd939x-sdw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wcd939x-sdw.c b/sound/soc/codecs/wcd939x-sdw.c index 36868fad3e8b..f7a9323a9fea 100644 --- a/sound/soc/codecs/wcd939x-sdw.c +++ b/sound/soc/codecs/wcd939x-sdw.c @@ -1507,7 +1507,7 @@ static const struct sdw_device_id wcd9390_slave_id[] = { }; MODULE_DEVICE_TABLE(sdw, wcd9390_slave_id); -static int __maybe_unused wcd939x_sdw_runtime_suspend(struct device *dev) +static int wcd939x_sdw_runtime_suspend(struct device *dev) { struct wcd939x_sdw_priv *wcd = dev_get_drvdata(dev); @@ -1519,7 +1519,7 @@ static int __maybe_unused wcd939x_sdw_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused wcd939x_sdw_runtime_resume(struct device *dev) +static int wcd939x_sdw_runtime_resume(struct device *dev) { struct wcd939x_sdw_priv *wcd = dev_get_drvdata(dev); @@ -1532,7 +1532,7 @@ static int __maybe_unused wcd939x_sdw_runtime_resume(struct device *dev) } static const struct dev_pm_ops wcd939x_sdw_pm_ops = { - SET_RUNTIME_PM_OPS(wcd939x_sdw_runtime_suspend, wcd939x_sdw_runtime_resume, NULL) + RUNTIME_PM_OPS(wcd939x_sdw_runtime_suspend, wcd939x_sdw_runtime_resume, NULL) }; static struct sdw_driver wcd9390_codec_driver = { @@ -1542,7 +1542,7 @@ static struct sdw_driver wcd9390_codec_driver = { .id_table = wcd9390_slave_id, .driver = { .name = "wcd9390-codec", - .pm = &wcd939x_sdw_pm_ops, + .pm = pm_ptr(&wcd939x_sdw_pm_ops), } }; module_sdw_driver(wcd9390_codec_driver); From patchwork Thu Mar 13 17:40:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015637 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A57581C863F for ; Thu, 13 Mar 2025 17:44:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887863; cv=none; b=MCPC25FQRiAeDqFBihHOdHuk1slOP/HCIyjwjpYWNQM5k3Bn8qJI3CQUVrRs/LpwAxEKJ3pTf7haOzm27YKl3u/ROAxLQGpaf43/NQ/5RuXXYdmtkWigTfchxlNkAK1rI29ud3BTjWV307AClXzO+ghG9850wihfMzaMfDaWx5Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887863; c=relaxed/simple; bh=JeEmFGWXcr1ksjTRIB5NIAk1cCx5Om14dTFVXMjcUAc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RrgRSRgEC1W2B8dQhrhp8bQ5lLyAPQ7VLN8g51oyW5uE8jthBj8gYklX9ui7vQheNPUqj5qfb4N3e2VOHMdts6Z7dRMRboWBH6B0sdQvsPSdKt69fVbb7bktpdZW92CGAaz30++gzWpOjZHg77oio+SscAxY7IJ5S1z3aeq1pJU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gi76Sc5K; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=pQwPdSxs; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Z0BBW9QI; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6FUFIlqd; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gi76Sc5K"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="pQwPdSxs"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Z0BBW9QI"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6FUFIlqd" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E8B8A211D3; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H3wUhDYMbL7wBRFASjlxY65pJ3wIBOqfHfUl3NPhKOs=; b=gi76Sc5Kg8th48TmQ/2GgzvS+uRjhQYMn2PQZNyVEZ/n+jlrNy8tOhMbAduIVwKjCy7Uym pLIiRvL7lksqaUNDwBewnL5eW0jgmuPzEIXYtcNQZ1HuVVLZ0ORKO8WLUB7leKEQEwiA5Z 2dqSKn3dcqfExhDYV8B1RO4pp2HkI4s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H3wUhDYMbL7wBRFASjlxY65pJ3wIBOqfHfUl3NPhKOs=; b=pQwPdSxsf036km245K/jH5G1R2Dml64qpLMJYpaYOrBMNkyR6IHOkYR5lXVvFHrAH7zBQc hI2rERzCE2J8W2CA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Z0BBW9QI; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=6FUFIlqd DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H3wUhDYMbL7wBRFASjlxY65pJ3wIBOqfHfUl3NPhKOs=; b=Z0BBW9QIr4r+UQnuQfRNIb8PmMiJ3BbWA8531cZZ3RGP7WTduRJZN6PzPltzvz0c4+xesJ oGD16z/k+brSUqDPcPcVn1Z/zH+u0/+eck18jnfLWE0z4GmwEgJvGFc052CHvYfjRRYhED hLuJ1wNtCiio2eMnFwKYcPhmZPoye2I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887722; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H3wUhDYMbL7wBRFASjlxY65pJ3wIBOqfHfUl3NPhKOs=; b=6FUFIlqdZmDfpKaIx+U2Sk8AX+tBuGhp3/Cg4wlwPRf7K/w+UPe/bf0HJBzyUDnzyVKflg 9Ar5a4S+fKIMDpCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C1ADD139D2; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id iF8DLuoY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:02 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 51/89] ASoC: wm2200: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:56 +0100 Message-ID: <20250313174139.29942-52-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: E8B8A211D3 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes and superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/wm2200.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index 7ed4ac5cce3c..87418c838ca0 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c @@ -2429,7 +2429,6 @@ static void wm2200_i2c_remove(struct i2c_client *i2c) wm2200->core_supplies); } -#ifdef CONFIG_PM static int wm2200_runtime_suspend(struct device *dev) { struct wm2200_priv *wm2200 = dev_get_drvdata(dev); @@ -2466,11 +2465,9 @@ static int wm2200_runtime_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops wm2200_pm = { - SET_RUNTIME_PM_OPS(wm2200_runtime_suspend, wm2200_runtime_resume, - NULL) + RUNTIME_PM_OPS(wm2200_runtime_suspend, wm2200_runtime_resume, NULL) }; static const struct i2c_device_id wm2200_i2c_id[] = { @@ -2482,7 +2479,7 @@ MODULE_DEVICE_TABLE(i2c, wm2200_i2c_id); static struct i2c_driver wm2200_i2c_driver = { .driver = { .name = "wm2200", - .pm = &wm2200_pm, + .pm = pm_ptr(&wm2200_pm), }, .probe = wm2200_i2c_probe, .remove = wm2200_i2c_remove, From patchwork Thu Mar 13 17:40:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015639 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88C3B1DE3BC for ; Thu, 13 Mar 2025 17:44:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887869; cv=none; b=YSKbwpbiy4CKuwT9buNWtVLsMg8RVgnPiTLWwjAPz4K3iHTyvhYrt5d45Vp4XkDCfaA1TwXNwrZxQFvf95SiZQo/3XD5T1AuD0ERqxd00aXmGZ2t4Vq5F7fP1Ew2aQoZVY3JUjSSgSxouRcUHfSe+KxlLCvxplXxyLgPYQV7nq8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887869; c=relaxed/simple; bh=bnU75/92jNpYlr6zkuNzC4Ex5MItOCOEkWYXOZ2bL5s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=an7gTZxMXFv9TH34jj5nPDQBwm8VKff4SC8nHhi1HzWxAsJROus6fx69dY0xD4/P19qwkH+TPTzaVAZnWTXT/HN8S2o/+frODHU7O3ItYdWBX2aWv0fGigm9GryTneNs1nJrghKckmh+HL5mQVGZXNXnMAhWJtHrU54f7+lzkrw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mb2qcGee; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Z8EGpef1; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mb2qcGee; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Z8EGpef1; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mb2qcGee"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Z8EGpef1"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mb2qcGee"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Z8EGpef1" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 251E9211E6; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cca5eFUhI/uPp64PuEjeeyvRJ0804EnNFKJfsNxe3xM=; b=mb2qcGeeaDIBx1EHFHQeKtoLCLTgT+hjjL/bL+UOXsBo/E6uGY8Z9sHd788B3SFiBqtNbZ igWWm7JIL1tmNnwrS2FNi1jD+fohiFtzXlTLgQ2ZOzi9FnGe3/0TInpkqJZfY/SzLI6sFD ORmkBYRUdvW+xfmuD8X5RYWAqfVFJ5U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cca5eFUhI/uPp64PuEjeeyvRJ0804EnNFKJfsNxe3xM=; b=Z8EGpef1//PIsativ42FeoouyVAWEnQtKxU5DYk8FOQ0K6VMtBdxtMcXLSnkmgeJJ+a9yu rMCfnd+Q08OYmYBw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=mb2qcGee; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Z8EGpef1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cca5eFUhI/uPp64PuEjeeyvRJ0804EnNFKJfsNxe3xM=; b=mb2qcGeeaDIBx1EHFHQeKtoLCLTgT+hjjL/bL+UOXsBo/E6uGY8Z9sHd788B3SFiBqtNbZ igWWm7JIL1tmNnwrS2FNi1jD+fohiFtzXlTLgQ2ZOzi9FnGe3/0TInpkqJZfY/SzLI6sFD ORmkBYRUdvW+xfmuD8X5RYWAqfVFJ5U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cca5eFUhI/uPp64PuEjeeyvRJ0804EnNFKJfsNxe3xM=; b=Z8EGpef1//PIsativ42FeoouyVAWEnQtKxU5DYk8FOQ0K6VMtBdxtMcXLSnkmgeJJ+a9yu rMCfnd+Q08OYmYBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id EED17137BA; Thu, 13 Mar 2025 17:42:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6E3rOOoY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:02 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 52/89] ASoC: wm5100: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:40:57 +0100 Message-ID: <20250313174139.29942-53-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 251E9211E6 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/wm5100.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index dfeec55159a6..d9e5762324df 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -2625,7 +2625,6 @@ static void wm5100_i2c_remove(struct i2c_client *i2c) gpiod_set_value_cansleep(wm5100->ldo_ena, 0); } -#ifdef CONFIG_PM static int wm5100_runtime_suspend(struct device *dev) { struct wm5100_priv *wm5100 = dev_get_drvdata(dev); @@ -2662,11 +2661,9 @@ static int wm5100_runtime_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops wm5100_pm = { - SET_RUNTIME_PM_OPS(wm5100_runtime_suspend, wm5100_runtime_resume, - NULL) + RUNTIME_PM_OPS(wm5100_runtime_suspend, wm5100_runtime_resume, NULL) }; static const struct i2c_device_id wm5100_i2c_id[] = { @@ -2678,7 +2675,7 @@ MODULE_DEVICE_TABLE(i2c, wm5100_i2c_id); static struct i2c_driver wm5100_i2c_driver = { .driver = { .name = "wm5100", - .pm = &wm5100_pm, + .pm = pm_ptr(&wm5100_pm), }, .probe = wm5100_i2c_probe, .remove = wm5100_i2c_remove, From patchwork Thu Mar 13 17:40:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015641 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B32401D63F8 for ; Thu, 13 Mar 2025 17:44:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887875; cv=none; b=DjrovNVnyDov4+LlVPCMJ8Xm4Rms+ITROs6+45641D7fA4B1dsWTCEVYT2LUg0ImjfaNqLnNn27alQi4UPIgsgKbbF3S/G1MrnYcLYD2jHTNjvIpxgsZpl2jIF767HOLLlhXU39ocU4JyjJfGlhx5FWm7z2GUGq45Vh63YFLC3Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887875; c=relaxed/simple; bh=XQsCDselaO4g/wW4jFxbyVDMz95u84D6GhWBYyIXLuY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JAtexJFl+wmBtKNQuCinHklpGpDdnbGptTmuQUzqoJ1MBAwzK9OxFNhmtOB2aaqu8nvEgxL3NKjbuBm3Rw3anAKbeBBFTDDDxzz4rL+TLgwNvFmsSw9aHbHYP06xAGyYgR0U+JfiHX44xINPJqXQBvIKkEcr0tH/iDCXEzZI3Q8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=GYljKbIB; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+LIMX7/5; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=GYljKbIB; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+LIMX7/5; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="GYljKbIB"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+LIMX7/5"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="GYljKbIB"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+LIMX7/5" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 522F7211E8; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b5nRIQHGn5bmY2QyMa5uH+o+XSLwt6TXb/HLsxQm90o=; b=GYljKbIBsOQQOIEDKr+IIuQ7GsAvHK8EWYAYuvvdW9dHIVw8elXdst2f3DqN6J4yRXugos vkuYeJuMC8gB0Mgll/Ch4aZ9oMn+Mmd80puBUhUOpzOEC1qL38YdpzcXNeWqJOFV6GpdBq ey0JBE3FV7Z0tkhtQEhYmjg7uIXbv9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b5nRIQHGn5bmY2QyMa5uH+o+XSLwt6TXb/HLsxQm90o=; b=+LIMX7/5b0IwPYtNgkQdjmtAOE8J/6yBbKQAAyEoYRs/cfE92dwyWjnIwIKD8b37Y7yr5Y fH9lzhJi3VuyWxBA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b5nRIQHGn5bmY2QyMa5uH+o+XSLwt6TXb/HLsxQm90o=; b=GYljKbIBsOQQOIEDKr+IIuQ7GsAvHK8EWYAYuvvdW9dHIVw8elXdst2f3DqN6J4yRXugos vkuYeJuMC8gB0Mgll/Ch4aZ9oMn+Mmd80puBUhUOpzOEC1qL38YdpzcXNeWqJOFV6GpdBq ey0JBE3FV7Z0tkhtQEhYmjg7uIXbv9U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b5nRIQHGn5bmY2QyMa5uH+o+XSLwt6TXb/HLsxQm90o=; b=+LIMX7/5b0IwPYtNgkQdjmtAOE8J/6yBbKQAAyEoYRs/cfE92dwyWjnIwIKD8b37Y7yr5Y fH9lzhJi3VuyWxBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2C358139D2; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id IJl5CesY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:03 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 53/89] ASoC: wm8804: Convert to EXPORT_GPL_DEV_PM_OPS() Date: Thu, 13 Mar 2025 18:40:58 +0100 Message-ID: <20250313174139.29942-54-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer EXPORT_GPL_DEV_PM_OPS() macro together with pm_ptr(). This allows us to drop superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/wm8804-i2c.c | 2 +- sound/soc/codecs/wm8804-spi.c | 2 +- sound/soc/codecs/wm8804.c | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/wm8804-i2c.c b/sound/soc/codecs/wm8804-i2c.c index e80dad87219b..3380d7301b17 100644 --- a/sound/soc/codecs/wm8804-i2c.c +++ b/sound/soc/codecs/wm8804-i2c.c @@ -56,7 +56,7 @@ MODULE_DEVICE_TABLE(acpi, wm8804_acpi_match); static struct i2c_driver wm8804_i2c_driver = { .driver = { .name = "wm8804", - .pm = &wm8804_pm, + .pm = pm_ptr(&wm8804_pm), .of_match_table = of_match_ptr(wm8804_of_match), .acpi_match_table = ACPI_PTR(wm8804_acpi_match), }, diff --git a/sound/soc/codecs/wm8804-spi.c b/sound/soc/codecs/wm8804-spi.c index 628568724c20..cf74abfb1a2c 100644 --- a/sound/soc/codecs/wm8804-spi.c +++ b/sound/soc/codecs/wm8804-spi.c @@ -38,7 +38,7 @@ MODULE_DEVICE_TABLE(of, wm8804_of_match); static struct spi_driver wm8804_spi_driver = { .driver = { .name = "wm8804", - .pm = &wm8804_pm, + .pm = pm_ptr(&wm8804_pm), .of_match_table = wm8804_of_match, }, .probe = wm8804_spi_probe, diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c index 0a879c29eb04..48700cc25cb0 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -680,7 +680,6 @@ void wm8804_remove(struct device *dev) } EXPORT_SYMBOL_GPL(wm8804_remove); -#if IS_ENABLED(CONFIG_PM) static int wm8804_runtime_resume(struct device *dev) { struct wm8804_priv *wm8804 = dev_get_drvdata(dev); @@ -713,12 +712,10 @@ static int wm8804_runtime_suspend(struct device *dev) return 0; } -#endif -const struct dev_pm_ops wm8804_pm = { - SET_RUNTIME_PM_OPS(wm8804_runtime_suspend, wm8804_runtime_resume, NULL) +EXPORT_GPL_DEV_PM_OPS(wm8804_pm) = { + RUNTIME_PM_OPS(wm8804_runtime_suspend, wm8804_runtime_resume, NULL) }; -EXPORT_SYMBOL_GPL(wm8804_pm); MODULE_DESCRIPTION("ASoC WM8804 driver"); MODULE_AUTHOR("Dimitris Papastamos "); From patchwork Thu Mar 13 17:40:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015646 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C1021DB13E for ; Thu, 13 Mar 2025 17:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887888; cv=none; b=D2XyenYxmGsczgehr/7GZgcF6Ek6ydXiMH1AjAi/l01XYlqhZX22haJy7Dhusa2SZKh2o6TGs792AUWgt/g6yfm2DGwTHrasPkabRW5nwmlfalWjHUews+/aDKWr/MHH+9ptdEMvnjKRBA48vdrSXPxID7ox9+c75hHguGGsuwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887888; c=relaxed/simple; bh=/tBhmf3Ovdo4VEPSDkJe4Y9L/HdJHDsJDQm8KoALQWQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cCwzQATJmsd7SOrPhltErFeSwRgfx/KVyT3v9fCyHuFTUFj/pPwqvvqMQ78gYfZdEQhoRUVq2mMPF9sAm2pU8Vr2wNg94OZ1MzqXZRsNOkY4c4UbEGsfokywaWRlZzwl/5nN73XjP0mQoid8yt52uKYDc1MrA43mUD+k1DK51uY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=dEoFDuA+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+hAE0Ypu; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=dEoFDuA+; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+hAE0Ypu; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="dEoFDuA+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+hAE0Ypu"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="dEoFDuA+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+hAE0Ypu" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8085A1F7A9; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mz4PcbJhYo7DkMxaR2N/QXrTiOXmI1qE0Po9st5Jraw=; b=dEoFDuA+k7v+nkKPlcH9yCibmY3OrKG8ZEIFJosal+tydteIP0jE58a2KzR7cWITJDDR3i p6gdvLfUSdfRGYNzdhmnI+QrJW4VGMDlhXUO8r2lo+9ANsaQ9FzAmBEqBMgD7OyazyXVdH 4bRoEG9r6B4OL2Tfn6d/gqcOJpM+1Yk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mz4PcbJhYo7DkMxaR2N/QXrTiOXmI1qE0Po9st5Jraw=; b=+hAE0YpuuhYUpQhRdzmm3UxVYYzUaVt/vF74qOPDDjJQiAu8CkUor0kqhKrSeJxr/8MH07 lLGNZ5BRNMtlwEBg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=dEoFDuA+; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=+hAE0Ypu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mz4PcbJhYo7DkMxaR2N/QXrTiOXmI1qE0Po9st5Jraw=; b=dEoFDuA+k7v+nkKPlcH9yCibmY3OrKG8ZEIFJosal+tydteIP0jE58a2KzR7cWITJDDR3i p6gdvLfUSdfRGYNzdhmnI+QrJW4VGMDlhXUO8r2lo+9ANsaQ9FzAmBEqBMgD7OyazyXVdH 4bRoEG9r6B4OL2Tfn6d/gqcOJpM+1Yk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mz4PcbJhYo7DkMxaR2N/QXrTiOXmI1qE0Po9st5Jraw=; b=+hAE0YpuuhYUpQhRdzmm3UxVYYzUaVt/vF74qOPDDjJQiAu8CkUor0kqhKrSeJxr/8MH07 lLGNZ5BRNMtlwEBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5ACD9137BA; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OHviFOsY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:03 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 54/89] ASoC: wm8962: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:40:59 +0100 Message-ID: <20250313174139.29942-55-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 8085A1F7A9 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/wm8962.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 0aaac24eeb5a..68f746626c33 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3850,7 +3850,6 @@ static void wm8962_i2c_remove(struct i2c_client *client) pm_runtime_disable(&client->dev); } -#ifdef CONFIG_PM static int wm8962_runtime_resume(struct device *dev) { struct wm8962_priv *wm8962 = dev_get_drvdata(dev); @@ -3930,11 +3929,10 @@ static int wm8962_runtime_suspend(struct device *dev) return 0; } -#endif static const struct dev_pm_ops wm8962_pm = { - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) - SET_RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) + RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL) }; static const struct i2c_device_id wm8962_i2c_id[] = { @@ -3953,7 +3951,7 @@ static struct i2c_driver wm8962_i2c_driver = { .driver = { .name = "wm8962", .of_match_table = wm8962_of_match, - .pm = &wm8962_pm, + .pm = pm_ptr(&wm8962_pm), }, .probe = wm8962_i2c_probe, .remove = wm8962_i2c_remove, From patchwork Thu Mar 13 17:41:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015643 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D60481DB125 for ; Thu, 13 Mar 2025 17:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887881; cv=none; b=MEAnSdwYx0r6rW/Q5+rVxNxrvuLVpGYvImclcG79FRIsBQVOhk+hqbhQ9g71vvM9BQvO68n1UkE74wHNmX/ZLkvRaYaCRVMkBMOOkj23gOgIth0X+MEmE7zqvY0reIgk37/DX1M36kjmR2DCsJxotbrk6GDaCAEI403N0LScCxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887881; c=relaxed/simple; bh=SkeisvqmKDl4E785j1pZdfWTXR9dfWWxqALTMIz4kmk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MswblPiXKeC3oc5WMx7ON649qpV/I9hHoYScOC8JQfcUvmW4BmY+t/d7J1kdKARjedCZTdZGVM0i7MnIIvhjg6uDbZhDOIQ9t3JwTLOmIzU6BQtPM6IER/m/Bpgt7xFHaVr5BPGte/6FSjqadQd1fXTJzKKNmydeoGa/NFpyl8Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Iur2S6hf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=AOOMPf7Z; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Iur2S6hf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=AOOMPf7Z; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Iur2S6hf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="AOOMPf7Z"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Iur2S6hf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="AOOMPf7Z" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AD6FF211EB; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YiLFY1pSPHECq3tXsO3uKYKb1Dlhs/zDOF66tuH+oi0=; b=Iur2S6hfibOTE+HQXVVeuilYs1lYr7IhvQ6K7MO4TjHe9QQh5pyp2R/0CFEtPx93tr4lcN KhLFfT0DekwdnlZNCcVHCPi3vJACnJBX6KJ3c+tuRkFOBd/MC2yxHCT2VpMBqHpJQs0Egn w1rTIR56i21x/Gc/togLBlp2Sya+eBs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YiLFY1pSPHECq3tXsO3uKYKb1Dlhs/zDOF66tuH+oi0=; b=AOOMPf7ZioszGrryiqYoWbNdelfqBTteNrPNhHM5DXc0WjHCzU2RT6D3XA+4Fr8dK4KySC ecAC8UvMkwj97dBg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Iur2S6hf; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=AOOMPf7Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YiLFY1pSPHECq3tXsO3uKYKb1Dlhs/zDOF66tuH+oi0=; b=Iur2S6hfibOTE+HQXVVeuilYs1lYr7IhvQ6K7MO4TjHe9QQh5pyp2R/0CFEtPx93tr4lcN KhLFfT0DekwdnlZNCcVHCPi3vJACnJBX6KJ3c+tuRkFOBd/MC2yxHCT2VpMBqHpJQs0Egn w1rTIR56i21x/Gc/togLBlp2Sya+eBs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YiLFY1pSPHECq3tXsO3uKYKb1Dlhs/zDOF66tuH+oi0=; b=AOOMPf7ZioszGrryiqYoWbNdelfqBTteNrPNhHM5DXc0WjHCzU2RT6D3XA+4Fr8dK4KySC ecAC8UvMkwj97dBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 881F3139D2; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YJT1H+sY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:03 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 55/89] ASoC: wm8994: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:41:00 +0100 Message-ID: <20250313174139.29942-56-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: AD6FF211EB X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us superfluous CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: patches@opensource.cirrus.com Signed-off-by: Takashi Iwai --- sound/soc/codecs/wm8994.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 69a22992c281..240ec1bed234 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -4662,7 +4662,6 @@ static void wm8994_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -#ifdef CONFIG_PM_SLEEP static int wm8994_suspend(struct device *dev) { struct wm8994_priv *wm8994 = dev_get_drvdata(dev); @@ -4687,16 +4686,15 @@ static int wm8994_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops wm8994_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(wm8994_suspend, wm8994_resume) + SYSTEM_SLEEP_PM_OPS(wm8994_suspend, wm8994_resume) }; static struct platform_driver wm8994_codec_driver = { .driver = { .name = "wm8994-codec", - .pm = &wm8994_pm_ops, + .pm = pm_ptr(&wm8994_pm_ops), }, .probe = wm8994_probe, .remove = wm8994_remove, From patchwork Thu Mar 13 17:41:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015645 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3DEA1CD215 for ; Thu, 13 Mar 2025 17:44:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887887; cv=none; b=LCDnoz2DPCCX4Nt8QjXw+8jTDfLcFmux3snTFBPyJ7Q5wZKnckKyOILxPMx1n4um43c1z70gbUiEprzBTU3V9dkxrjlVyFADtyzIJekcBtfhwOrKVi4V+zVIzxWGl4v68lfNqL9bOoK9XTa7BBTaA738d7fdaRQ9vw5Ir4fs4rY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887887; c=relaxed/simple; bh=uF1BxHuwmghaFEziZfN9TuXIHk98gn9NF+btJKtLtDs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CeWFMwKZtyu41QoEcg8j+kpd/oZI8DMd7OV0miyLPxjUw5ZgN4K+7IDfM0bN1WZKb7BRQLmxcNEsZwvUHr6F+FldsjnmV1Z5pqcGl4MxdfvXJ/8ANGH80GMjUJQhGU+Sgpk9K8780eqSb5CNXO5FdAX9Ogev1arbASrCx2ugiEQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OY7DcMUa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Bq74QoYv; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=OY7DcMUa; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Bq74QoYv; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OY7DcMUa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Bq74QoYv"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OY7DcMUa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Bq74QoYv" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DA7A1211E9; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kyz48yFE8jM3WTzHesrNVg/2fCoZk+apeucYJc8C03g=; b=OY7DcMUamrrzHC0zOAj6ZwTlBI4VjRI7AJosv76YgAWE6JHLQFreZQHA7cAwcB9vEAsMCj iMetDGs60X1jjDTBkTqrp87FPgUX6g4QymJBcJzaydIOqxhmHxz5ehLEwpYvscJwZOnlZJ dhzlgMBWYwdLXxAXnNlFQfDyI7TsaaM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kyz48yFE8jM3WTzHesrNVg/2fCoZk+apeucYJc8C03g=; b=Bq74QoYvmJRjI9V9FI9wCgbRUgwT5O+sNMt+XllzfpglIjMZafu7QK/C8fklB/F9x2C8Sh LZTxhkV2cTdkknCw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kyz48yFE8jM3WTzHesrNVg/2fCoZk+apeucYJc8C03g=; b=OY7DcMUamrrzHC0zOAj6ZwTlBI4VjRI7AJosv76YgAWE6JHLQFreZQHA7cAwcB9vEAsMCj iMetDGs60X1jjDTBkTqrp87FPgUX6g4QymJBcJzaydIOqxhmHxz5ehLEwpYvscJwZOnlZJ dhzlgMBWYwdLXxAXnNlFQfDyI7TsaaM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887723; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kyz48yFE8jM3WTzHesrNVg/2fCoZk+apeucYJc8C03g=; b=Bq74QoYvmJRjI9V9FI9wCgbRUgwT5O+sNMt+XllzfpglIjMZafu7QK/C8fklB/F9x2C8Sh LZTxhkV2cTdkknCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B4E4F137BA; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YDPYKusY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:03 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 56/89] ASoC: wsa881x: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:01 +0100 Message-ID: <20250313174139.29942-57-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Srinivas Kandagatla Signed-off-by: Takashi Iwai --- sound/soc/codecs/wsa881x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c index a3999bb6d5e2..6627d2da3722 100644 --- a/sound/soc/codecs/wsa881x.c +++ b/sound/soc/codecs/wsa881x.c @@ -1169,7 +1169,7 @@ static int wsa881x_probe(struct sdw_slave *pdev, ARRAY_SIZE(wsa881x_dais)); } -static int __maybe_unused wsa881x_runtime_suspend(struct device *dev) +static int wsa881x_runtime_suspend(struct device *dev) { struct regmap *regmap = dev_get_regmap(dev, NULL); struct wsa881x_priv *wsa881x = dev_get_drvdata(dev); @@ -1182,7 +1182,7 @@ static int __maybe_unused wsa881x_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused wsa881x_runtime_resume(struct device *dev) +static int wsa881x_runtime_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct regmap *regmap = dev_get_regmap(dev, NULL); @@ -1206,7 +1206,7 @@ static int __maybe_unused wsa881x_runtime_resume(struct device *dev) } static const struct dev_pm_ops wsa881x_pm_ops = { - SET_RUNTIME_PM_OPS(wsa881x_runtime_suspend, wsa881x_runtime_resume, NULL) + RUNTIME_PM_OPS(wsa881x_runtime_suspend, wsa881x_runtime_resume, NULL) }; static const struct sdw_device_id wsa881x_slave_id[] = { @@ -1222,7 +1222,7 @@ static struct sdw_driver wsa881x_codec_driver = { .id_table = wsa881x_slave_id, .driver = { .name = "wsa881x-codec", - .pm = &wsa881x_pm_ops, + .pm = pm_ptr(&wsa881x_pm_ops), } }; module_sdw_driver(wsa881x_codec_driver); From patchwork Thu Mar 13 17:41:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015648 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E1851D89E3 for ; Thu, 13 Mar 2025 17:44:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887894; cv=none; b=bgqrKwsZb3f8MnMmIyKbpMjVavP7dGjINmr+nx4R61UXoOFB4wc351uQ46SGXvJHjky87Vv5Zky+9Bz4wW+bHUdhrGaecXQWvv7rK+XPRKnEUG5ODeJ6m0tQchsmCPy9kJm+OZYAeqpj1UT3fD0mLL5mJE5TrbEbTuP7lSuyWyM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887894; c=relaxed/simple; bh=kHVSGMiI0ShAwQesyuGTdnCEliu+6FKRcQeShXV5CBQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cgbzDSyae99QeWqolp7WyPBbBVA3RxvqIi1U1c7Haa2lcJu6xXRN2PYvp3cBzdSh/3BjKQGVMbIUpBUqWcF0siVf1MGmsXjws2Y7vQ/h0OYMjt8YeUUcLagJNOKbFR725CPBJypjAlwF3tJJhA0YF6txAGJTgYoVI5uHSFgLDwQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fPGK4f3l; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4MoI13XD; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=fPGK4f3l; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4MoI13XD; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fPGK4f3l"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4MoI13XD"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="fPGK4f3l"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4MoI13XD" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 115791F7A7; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S5eFdFGyPMIsJzEPdx3mkiWWuTeBIrmyQeRC30/BpZQ=; b=fPGK4f3lIpOQaYI3bOLWMS+M04WVjvxpseA0d59MiWRNjbMHlrLo012IDkF//h2MYXI2TM xWR7FuFzxHZyQv3PkDJQiYROiXmtTB2hgafiLK1SEi0wFxwyIoZRJRuPSl5iB1DIs8sJeY BHema/spP9wWOni449VvTHEHVfHPwTM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S5eFdFGyPMIsJzEPdx3mkiWWuTeBIrmyQeRC30/BpZQ=; b=4MoI13XDDXcb9wBRRiGURm1y/DZfIxGmDJ3UkgGS9E6k0QBBXMZ0T5nJlmMnbyQRy5JSs6 b9xeX0z7k96S0kCQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=fPGK4f3l; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=4MoI13XD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S5eFdFGyPMIsJzEPdx3mkiWWuTeBIrmyQeRC30/BpZQ=; b=fPGK4f3lIpOQaYI3bOLWMS+M04WVjvxpseA0d59MiWRNjbMHlrLo012IDkF//h2MYXI2TM xWR7FuFzxHZyQv3PkDJQiYROiXmtTB2hgafiLK1SEi0wFxwyIoZRJRuPSl5iB1DIs8sJeY BHema/spP9wWOni449VvTHEHVfHPwTM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S5eFdFGyPMIsJzEPdx3mkiWWuTeBIrmyQeRC30/BpZQ=; b=4MoI13XDDXcb9wBRRiGURm1y/DZfIxGmDJ3UkgGS9E6k0QBBXMZ0T5nJlmMnbyQRy5JSs6 b9xeX0z7k96S0kCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E1A9F139D2; Thu, 13 Mar 2025 17:42:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id gMvdNesY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:03 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 57/89] ASoC: wsa883x: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:02 +0100 Message-ID: <20250313174139.29942-58-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 115791F7A7 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Srinivas Kandagatla Signed-off-by: Takashi Iwai --- sound/soc/codecs/wsa883x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index a5a6cb90bb43..d259e1d4d83d 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -1636,7 +1636,7 @@ static int wsa883x_probe(struct sdw_slave *pdev, } -static int __maybe_unused wsa883x_runtime_suspend(struct device *dev) +static int wsa883x_runtime_suspend(struct device *dev) { struct regmap *regmap = dev_get_regmap(dev, NULL); @@ -1646,7 +1646,7 @@ static int __maybe_unused wsa883x_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused wsa883x_runtime_resume(struct device *dev) +static int wsa883x_runtime_resume(struct device *dev) { struct regmap *regmap = dev_get_regmap(dev, NULL); @@ -1657,7 +1657,7 @@ static int __maybe_unused wsa883x_runtime_resume(struct device *dev) } static const struct dev_pm_ops wsa883x_pm_ops = { - SET_RUNTIME_PM_OPS(wsa883x_runtime_suspend, wsa883x_runtime_resume, NULL) + RUNTIME_PM_OPS(wsa883x_runtime_suspend, wsa883x_runtime_resume, NULL) }; static const struct sdw_device_id wsa883x_swr_id[] = { @@ -1670,7 +1670,7 @@ MODULE_DEVICE_TABLE(sdw, wsa883x_swr_id); static struct sdw_driver wsa883x_codec_driver = { .driver = { .name = "wsa883x-codec", - .pm = &wsa883x_pm_ops, + .pm = pm_ptr(&wsa883x_pm_ops), .suppress_bind_attrs = true, }, .probe = wsa883x_probe, From patchwork Thu Mar 13 17:41:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015647 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8207D1D7E37 for ; Thu, 13 Mar 2025 17:44:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887894; cv=none; b=koMWbb41lyQzv0Pg93DkMJkBKqqgpq8SRUiZWyXude9DBiHODNI7ssnerrYy/A0ISK00v0RRVwJD/cu77s+K4cCxJDX4CVsoDYbvT5KDOPfNY23BLRNO/4kWvN4F/AFUJfvjgWWaKdyTar1+tFFTh2gQV9BRC6canm7KT35ELf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887894; c=relaxed/simple; bh=STIbrtp2nG3qXZNm6ZM0v8HSeDX/bPE89LchKFpldiE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oOpQDit/Ad4n9BqxRoBIydHjtZsgbTjVcfkpKo8o/O+bfsrNXWy8qY1JN9ui47uqtbW+Pmp56h3ZZaqG3YYFRANkpZ8sGLjTDm1MOLjMKC2vpkfj2w45p51HOPe6Lrkx6/Fb1ol/Z4ExJ5FFf9Amc1qRik6dsp/b14Gg0PSLliU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Im1yC9jf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=kKIn3lUb; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Im1yC9jf; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=kKIn3lUb; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Im1yC9jf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="kKIn3lUb"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Im1yC9jf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="kKIn3lUb" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3E4A2211EC; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ia8H6xE/qx4oNBPu+T7XWMEbIuLOOlNcF1HrWIIhOBA=; b=Im1yC9jfYlhzzE3PuJWZjW5axBZ2fuOeCvvSMyTpBSjgsvRknWSOelJRMcMcqxnWPqo5lx AM+ksF4BUCcY4/a3nIhqyNMv9ERbbZ8GR8DQ53+Wu7Ci7ZLRVhWzDmbA9AcCr/q2PFce6y yA2TGWPsW4IsC3R3MJPZ7wpi1KJrBQ4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ia8H6xE/qx4oNBPu+T7XWMEbIuLOOlNcF1HrWIIhOBA=; b=kKIn3lUbm6pVK+FtVpkOKqtp5IBoO6fzhfmGdzysRiXezj2DNa3ygB4ykmt3G0Tc2SXinw iXr3hhRARFyYhGDA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Im1yC9jf; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=kKIn3lUb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ia8H6xE/qx4oNBPu+T7XWMEbIuLOOlNcF1HrWIIhOBA=; b=Im1yC9jfYlhzzE3PuJWZjW5axBZ2fuOeCvvSMyTpBSjgsvRknWSOelJRMcMcqxnWPqo5lx AM+ksF4BUCcY4/a3nIhqyNMv9ERbbZ8GR8DQ53+Wu7Ci7ZLRVhWzDmbA9AcCr/q2PFce6y yA2TGWPsW4IsC3R3MJPZ7wpi1KJrBQ4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ia8H6xE/qx4oNBPu+T7XWMEbIuLOOlNcF1HrWIIhOBA=; b=kKIn3lUbm6pVK+FtVpkOKqtp5IBoO6fzhfmGdzysRiXezj2DNa3ygB4ykmt3G0Tc2SXinw iXr3hhRARFyYhGDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1821B137BA; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id wOmhBOwY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:04 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 58/89] ASoC: wsa884x: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:03 +0100 Message-ID: <20250313174139.29942-59-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 3E4A2211EC X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Srinivas Kandagatla Signed-off-by: Takashi Iwai --- sound/soc/codecs/wsa884x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wsa884x.c b/sound/soc/codecs/wsa884x.c index 560a2c04b695..8051483aa1ac 100644 --- a/sound/soc/codecs/wsa884x.c +++ b/sound/soc/codecs/wsa884x.c @@ -2136,7 +2136,7 @@ static int wsa884x_probe(struct sdw_slave *pdev, ARRAY_SIZE(wsa884x_dais)); } -static int __maybe_unused wsa884x_runtime_suspend(struct device *dev) +static int wsa884x_runtime_suspend(struct device *dev) { struct regmap *regmap = dev_get_regmap(dev, NULL); @@ -2146,7 +2146,7 @@ static int __maybe_unused wsa884x_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused wsa884x_runtime_resume(struct device *dev) +static int wsa884x_runtime_resume(struct device *dev) { struct regmap *regmap = dev_get_regmap(dev, NULL); @@ -2157,7 +2157,7 @@ static int __maybe_unused wsa884x_runtime_resume(struct device *dev) } static const struct dev_pm_ops wsa884x_pm_ops = { - SET_RUNTIME_PM_OPS(wsa884x_runtime_suspend, wsa884x_runtime_resume, NULL) + RUNTIME_PM_OPS(wsa884x_runtime_suspend, wsa884x_runtime_resume, NULL) }; static const struct sdw_device_id wsa884x_swr_id[] = { @@ -2169,7 +2169,7 @@ MODULE_DEVICE_TABLE(sdw, wsa884x_swr_id); static struct sdw_driver wsa884x_codec_driver = { .driver = { .name = "wsa884x-codec", - .pm = &wsa884x_pm_ops, + .pm = pm_ptr(&wsa884x_pm_ops), }, .probe = wsa884x_probe, .ops = &wsa884x_slave_ops, From patchwork Thu Mar 13 17:41:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015649 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E59C11D63E4 for ; Thu, 13 Mar 2025 17:44:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887900; cv=none; b=VQAtYpCZrUfUfOrfuE0aqVaoYA+mAmr1ai1JFSvdbOdo7apxfzwO60MW6LGjrVkk1ZZmbIAok/vSA+KB64kfsNeRVJP6K+dohNDVjOJZy0gnat1MGkF0kMn6Ynqbvcc1iJ27oE9DToF41k9jT0izYydl4ezprKTvkB+Aj15T710= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887900; c=relaxed/simple; bh=xCyKN9HjDiAG+dmWnuuVjDNS2OQOIsnp22WD/wi9734=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GlLn/NZWL9dTEsYm6k2R1x+eyOLuQjh5E4zuLhxESiO7tCtPyTnlq3FfVoawFkUO6fYo7xfz7aRL4YNTkZ7oee7D/WfDKKVIhsX/JDValRzNxCaxtonzYfW5gHloP8ot03s3CkOnSDCTA4D/hmP4jQEFKek4qEc9UdC+Wv2J+pM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=qp6QxNQU; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RVkQoDbx; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=qp6QxNQU; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RVkQoDbx; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="qp6QxNQU"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RVkQoDbx"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="qp6QxNQU"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RVkQoDbx" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 627E11F786; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CbskMNAp1mggn/2pEB9x/6Ybt+H1+pcyfrKmrIs7Vys=; b=qp6QxNQUoGoIXWke/xhIY3W2MIrnKfsz+9sH01IS1aV7il4jaz6XjdGm1dJW5cAJPtmVy0 yRZOQ32qGt0BrtlFnCa7t4xyMuxssaVhabloTiQZzokoizpCI57fqA47YPwwyVgnFnZnTF +XULg9566wvjPWdoGh2083u/XOo5dHQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CbskMNAp1mggn/2pEB9x/6Ybt+H1+pcyfrKmrIs7Vys=; b=RVkQoDbxZqFTNxhD742rsRPq+nkuXCCU4mzAHs83DVKVZLYf6Umq+z09QC/9Q75TYzPtZL eG4jL0T5KfGFXODQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qp6QxNQU; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=RVkQoDbx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CbskMNAp1mggn/2pEB9x/6Ybt+H1+pcyfrKmrIs7Vys=; b=qp6QxNQUoGoIXWke/xhIY3W2MIrnKfsz+9sH01IS1aV7il4jaz6XjdGm1dJW5cAJPtmVy0 yRZOQ32qGt0BrtlFnCa7t4xyMuxssaVhabloTiQZzokoizpCI57fqA47YPwwyVgnFnZnTF +XULg9566wvjPWdoGh2083u/XOo5dHQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CbskMNAp1mggn/2pEB9x/6Ybt+H1+pcyfrKmrIs7Vys=; b=RVkQoDbxZqFTNxhD742rsRPq+nkuXCCU4mzAHs83DVKVZLYf6Umq+z09QC/9Q75TYzPtZL eG4jL0T5KfGFXODQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 43D2D139D2; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id AMNBD+wY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:04 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 59/89] ASoC: dwc: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:04 +0100 Message-ID: <20250313174139.29942-60-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 627E11F786 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/dwc/dwc-i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c index 57b789d7fbed..4c4171bb3fbb 100644 --- a/sound/soc/dwc/dwc-i2s.c +++ b/sound/soc/dwc/dwc-i2s.c @@ -478,7 +478,6 @@ static const struct snd_soc_dai_ops dw_i2s_dai_ops = { .set_tdm_slot = dw_i2s_set_tdm_slot, }; -#ifdef CONFIG_PM static int dw_i2s_runtime_suspend(struct device *dev) { struct dw_i2s_dev *dw_dev = dev_get_drvdata(dev); @@ -501,6 +500,7 @@ static int dw_i2s_runtime_resume(struct device *dev) return 0; } +#ifdef CONFIG_PM static int dw_i2s_suspend(struct snd_soc_component *component) { struct dw_i2s_dev *dev = snd_soc_component_get_drvdata(component); @@ -1084,7 +1084,7 @@ MODULE_DEVICE_TABLE(of, dw_i2s_of_match); #endif static const struct dev_pm_ops dwc_pm_ops = { - SET_RUNTIME_PM_OPS(dw_i2s_runtime_suspend, dw_i2s_runtime_resume, NULL) + RUNTIME_PM_OPS(dw_i2s_runtime_suspend, dw_i2s_runtime_resume, NULL) }; static struct platform_driver dw_i2s_driver = { @@ -1093,7 +1093,7 @@ static struct platform_driver dw_i2s_driver = { .driver = { .name = "designware-i2s", .of_match_table = of_match_ptr(dw_i2s_of_match), - .pm = &dwc_pm_ops, + .pm = pm_ptr(&dwc_pm_ops), }, }; From patchwork Thu Mar 13 17:41:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015656 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC1E21C84D5 for ; Thu, 13 Mar 2025 17:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887918; cv=none; b=O+Ng60+vysrzI4tpoye66oIui8/LVtKtpcWJgCFgrSENNb6JZ07TNgUOHT+z8HBfiOUHZb5S8R93PDVhLmIz1WiXXXtsvPSeLQ3TZpM9d060L4ikzv99W4JTx8C9TsXTOi2nEXLiksG9eUJry8Vs/e28AfU+KlqF2stVGnr7Wd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887918; c=relaxed/simple; bh=rUq1Hl6OargQ5lOB1EH5RQ09JPFdrap1GY/4liWuF6o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l8047bwown5EPAwvE1txg7uFNJP7o16izidg+nyXvTkUyyZeTl921JR09pyZFhyXxV/fNwxVvQcZy5F9+xk75YZZm+29D0AGlckaR17cVou/mfIfZ2A0vPWn9qxQfh6IT2H0nYI/wRlmwW5qfOBTO+7LraNMc0ZOb6tfvCrbaCU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=s3R2/OMh; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Iwpkeyym; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=s3R2/OMh; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Iwpkeyym; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="s3R2/OMh"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Iwpkeyym"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="s3R2/OMh"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Iwpkeyym" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A08491F7A8; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GaBAIbW155jbXLJIy9bsjYHk9xklqJuy92UeQuHMQ8Q=; b=s3R2/OMhwwoLpLVleEZ7ffTRhlb+A1XWjko644rzKkRvBa/MaglMHU+DL8MvcXsbjnLxD2 PlymVaJFjQrbcEKexrYWXWHyxCT24N5x85tPYPLXlVmhwZbpRTJk5cpKu1CNjXUCmQtWk1 z5yiE8TXEvvifY1+Mw6HPmaV5MkIg0Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GaBAIbW155jbXLJIy9bsjYHk9xklqJuy92UeQuHMQ8Q=; b=IwpkeyymbhqpOcCwxUMFi4tBsu3vKP2nmDrFRzIvoPDzSAaQNQWAR6MlOEQZ4c8FhKQcZH c12+lswIxZK8lmCw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="s3R2/OMh"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Iwpkeyym DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GaBAIbW155jbXLJIy9bsjYHk9xklqJuy92UeQuHMQ8Q=; b=s3R2/OMhwwoLpLVleEZ7ffTRhlb+A1XWjko644rzKkRvBa/MaglMHU+DL8MvcXsbjnLxD2 PlymVaJFjQrbcEKexrYWXWHyxCT24N5x85tPYPLXlVmhwZbpRTJk5cpKu1CNjXUCmQtWk1 z5yiE8TXEvvifY1+Mw6HPmaV5MkIg0Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GaBAIbW155jbXLJIy9bsjYHk9xklqJuy92UeQuHMQ8Q=; b=IwpkeyymbhqpOcCwxUMFi4tBsu3vKP2nmDrFRzIvoPDzSAaQNQWAR6MlOEQZ4c8FhKQcZH c12+lswIxZK8lmCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 69D7A137BA; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id oMCLGOwY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:04 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen Subject: [PATCH 60/89] ASoC: fsl: Convert to RUNTIME_PM_OPS() and co Date: Thu, 13 Mar 2025 18:41:05 +0100 Message-ID: <20250313174139.29942-61-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: A08491F7A8 X-Spam-Score: -1.51 X-Rspamd-Action: no action X-Spamd-Result: default: False [-1.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[suse.de:+]; FREEMAIL_CC(0.00)[vger.kernel.org,gmail.com]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr() This optimizes slightly when CONFIG_PM is disabled, too. Cc: Shengjiu Wang Cc: Xiubo Li Cc: Fabio Estevam Cc: Nicolin Chen Signed-off-by: Takashi Iwai --- sound/soc/fsl/fsl_aud2htx.c | 3 +-- sound/soc/fsl/fsl_esai.c | 9 +++------ sound/soc/fsl/fsl_micfil.c | 9 +++------ sound/soc/fsl/fsl_sai.c | 8 +++----- sound/soc/fsl/fsl_xcvr.c | 3 +-- 5 files changed, 11 insertions(+), 21 deletions(-) diff --git a/sound/soc/fsl/fsl_aud2htx.c b/sound/soc/fsl/fsl_aud2htx.c index bde642318835..da401561e2de 100644 --- a/sound/soc/fsl/fsl_aud2htx.c +++ b/sound/soc/fsl/fsl_aud2htx.c @@ -290,8 +290,7 @@ static int fsl_aud2htx_runtime_resume(struct device *dev) static const struct dev_pm_ops fsl_aud2htx_pm_ops = { RUNTIME_PM_OPS(fsl_aud2htx_runtime_suspend, fsl_aud2htx_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver fsl_aud2htx_driver = { diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index 0b247f16a163..cde0b0c6c1ef 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -1189,11 +1189,8 @@ static int fsl_esai_runtime_suspend(struct device *dev) } static const struct dev_pm_ops fsl_esai_pm_ops = { - SET_RUNTIME_PM_OPS(fsl_esai_runtime_suspend, - fsl_esai_runtime_resume, - NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(fsl_esai_runtime_suspend, fsl_esai_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver fsl_esai_driver = { @@ -1201,7 +1198,7 @@ static struct platform_driver fsl_esai_driver = { .remove = fsl_esai_remove, .driver = { .name = "fsl-esai-dai", - .pm = &fsl_esai_pm_ops, + .pm = pm_ptr(&fsl_esai_pm_ops), .of_match_table = fsl_esai_dt_ids, }, }; diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index 73d8910a6188..aabd90a8b3ec 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -1512,11 +1512,8 @@ static int fsl_micfil_runtime_resume(struct device *dev) } static const struct dev_pm_ops fsl_micfil_pm_ops = { - SET_RUNTIME_PM_OPS(fsl_micfil_runtime_suspend, - fsl_micfil_runtime_resume, - NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(fsl_micfil_runtime_suspend, fsl_micfil_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver fsl_micfil_driver = { @@ -1524,7 +1521,7 @@ static struct platform_driver fsl_micfil_driver = { .remove = fsl_micfil_remove, .driver = { .name = "fsl-micfil-dai", - .pm = &fsl_micfil_pm_ops, + .pm = pm_ptr(&fsl_micfil_pm_ops), .of_match_table = fsl_micfil_dt_ids, }, }; diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 9f33dd11d47f..ed2b4780c470 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1817,10 +1817,8 @@ static int fsl_sai_runtime_resume(struct device *dev) } static const struct dev_pm_ops fsl_sai_pm_ops = { - SET_RUNTIME_PM_OPS(fsl_sai_runtime_suspend, - fsl_sai_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(fsl_sai_runtime_suspend, fsl_sai_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver fsl_sai_driver = { @@ -1828,7 +1826,7 @@ static struct platform_driver fsl_sai_driver = { .remove = fsl_sai_remove, .driver = { .name = "fsl-sai", - .pm = &fsl_sai_pm_ops, + .pm = pm_ptr(&fsl_sai_pm_ops), .of_match_table = fsl_sai_ids, }, }; diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index c59c1af5a98a..83aea341c1b6 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1821,8 +1821,7 @@ static int fsl_xcvr_runtime_resume(struct device *dev) static const struct dev_pm_ops fsl_xcvr_pm_ops = { RUNTIME_PM_OPS(fsl_xcvr_runtime_suspend, fsl_xcvr_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver fsl_xcvr_driver = { From patchwork Thu Mar 13 17:41:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015650 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9BE51D5AB5 for ; Thu, 13 Mar 2025 17:44:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887900; cv=none; b=OjtyVgdTn9duzVAeFoOmyTDJUrVNYhJWCKoh+YMB/nqUkz/CRkot09VY1MNOJ7BtXNbjvWyDtWnk/ZcwyaSj9h4EMHh3C/t0TYoW+6jX4QgGNwwC/V0uEPskyBTBcK20p5p5Tg0XcKChiBCpL19WKLFZWxypatUW+kofgDNjvho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887900; c=relaxed/simple; bh=FQseqfWqnt7rDGS5tlc3+c9MCbYNXqgX+8LwlCTX+JA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TvV2FuryaJwLiaiCHYouRjem5Q7dpVwjVmz6Fc117wvdNM1vs1W+emMfOtdCluyvjYJkAnBwXpYsqVjlBQJjAzzRtltnK3XKp8Ul2k+IUpEpzwtGXtIz+BbnlOGT/1WlWdVLnpu/JJ7YxiWYqLcCo7YL2iB2sVg/Vjg9tsNArfo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=2S/mDp2P; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=cDPzxuYS; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=2S/mDp2P; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=cDPzxuYS; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="2S/mDp2P"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="cDPzxuYS"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="2S/mDp2P"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="cDPzxuYS" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id C68C7211EA; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2AvhhtmGqBubo8lJlurshI5OeqNn4Rc1lQcmFt2EIIY=; b=2S/mDp2PZPqJPhwI3/eAqZbL8U3chzvZG4eHa8uuLNpzvRTM7HqmeMzOHgVbW98yIy3vOc /Qfvoxa720cHwZZqOXmx/dsHFUTMBnoW7X2YIqFMhdgz4RVf0ZtmIEmRWyv3wpNGsUqUod dpMx4QQFY3Ih0ZsdWrErzDckQsGzF48= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2AvhhtmGqBubo8lJlurshI5OeqNn4Rc1lQcmFt2EIIY=; b=cDPzxuYSsI3J5IdFHJKUZ8rah09YNcR9Oh9UENu2JpNZswNx7WHCOjLjjbFH8wylzNBcSe /siqzojr4H4KUjAg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2AvhhtmGqBubo8lJlurshI5OeqNn4Rc1lQcmFt2EIIY=; b=2S/mDp2PZPqJPhwI3/eAqZbL8U3chzvZG4eHa8uuLNpzvRTM7HqmeMzOHgVbW98yIy3vOc /Qfvoxa720cHwZZqOXmx/dsHFUTMBnoW7X2YIqFMhdgz4RVf0ZtmIEmRWyv3wpNGsUqUod dpMx4QQFY3Ih0ZsdWrErzDckQsGzF48= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887724; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2AvhhtmGqBubo8lJlurshI5OeqNn4Rc1lQcmFt2EIIY=; b=cDPzxuYSsI3J5IdFHJKUZ8rah09YNcR9Oh9UENu2JpNZswNx7WHCOjLjjbFH8wylzNBcSe /siqzojr4H4KUjAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A6BA1139D2; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id iLdIJ+wY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:04 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 61/89] ASoC: img: Convert to RUNTIME_PM_OPS() and co Date: Thu, 13 Mar 2025 18:41:06 +0100 Message-ID: <20250313174139.29942-62-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/img/img-i2s-in.c | 9 +++------ sound/soc/img/img-i2s-out.c | 9 +++------ sound/soc/img/img-parallel-out.c | 5 ++--- sound/soc/img/img-spdif-in.c | 9 +++------ sound/soc/img/img-spdif-out.c | 10 ++++------ sound/soc/img/pistachio-internal-dac.c | 8 +++----- 6 files changed, 18 insertions(+), 32 deletions(-) diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c index 6a988976fb0d..98d2ab68883a 100644 --- a/sound/soc/img/img-i2s-in.c +++ b/sound/soc/img/img-i2s-in.c @@ -539,7 +539,6 @@ static void img_i2s_in_dev_remove(struct platform_device *pdev) img_i2s_in_runtime_suspend(&pdev->dev); } -#ifdef CONFIG_PM_SLEEP static int img_i2s_in_suspend(struct device *dev) { struct img_i2s_in *i2s = dev_get_drvdata(dev); @@ -586,7 +585,6 @@ static int img_i2s_in_resume(struct device *dev) return 0; } -#endif static const struct of_device_id img_i2s_in_of_match[] = { { .compatible = "img,i2s-in" }, @@ -595,16 +593,15 @@ static const struct of_device_id img_i2s_in_of_match[] = { MODULE_DEVICE_TABLE(of, img_i2s_in_of_match); static const struct dev_pm_ops img_i2s_in_pm_ops = { - SET_RUNTIME_PM_OPS(img_i2s_in_runtime_suspend, - img_i2s_in_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(img_i2s_in_suspend, img_i2s_in_resume) + RUNTIME_PM_OPS(img_i2s_in_runtime_suspend, img_i2s_in_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(img_i2s_in_suspend, img_i2s_in_resume) }; static struct platform_driver img_i2s_in_driver = { .driver = { .name = "img-i2s-in", .of_match_table = img_i2s_in_of_match, - .pm = &img_i2s_in_pm_ops + .pm = pm_ptr(&img_i2s_in_pm_ops) }, .probe = img_i2s_in_probe, .remove = img_i2s_in_dev_remove diff --git a/sound/soc/img/img-i2s-out.c b/sound/soc/img/img-i2s-out.c index 1211e6184d97..aedcf56a5359 100644 --- a/sound/soc/img/img-i2s-out.c +++ b/sound/soc/img/img-i2s-out.c @@ -539,7 +539,6 @@ static void img_i2s_out_dev_remove(struct platform_device *pdev) img_i2s_out_runtime_suspend(&pdev->dev); } -#ifdef CONFIG_PM_SLEEP static int img_i2s_out_suspend(struct device *dev) { struct img_i2s_out *i2s = dev_get_drvdata(dev); @@ -586,7 +585,6 @@ static int img_i2s_out_resume(struct device *dev) return 0; } -#endif static const struct of_device_id img_i2s_out_of_match[] = { { .compatible = "img,i2s-out" }, @@ -595,16 +593,15 @@ static const struct of_device_id img_i2s_out_of_match[] = { MODULE_DEVICE_TABLE(of, img_i2s_out_of_match); static const struct dev_pm_ops img_i2s_out_pm_ops = { - SET_RUNTIME_PM_OPS(img_i2s_out_runtime_suspend, - img_i2s_out_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(img_i2s_out_suspend, img_i2s_out_resume) + RUNTIME_PM_OPS(img_i2s_out_runtime_suspend, img_i2s_out_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(img_i2s_out_suspend, img_i2s_out_resume) }; static struct platform_driver img_i2s_out_driver = { .driver = { .name = "img-i2s-out", .of_match_table = img_i2s_out_of_match, - .pm = &img_i2s_out_pm_ops + .pm = pm_ptr(&img_i2s_out_pm_ops) }, .probe = img_i2s_out_probe, .remove = img_i2s_out_dev_remove diff --git a/sound/soc/img/img-parallel-out.c b/sound/soc/img/img-parallel-out.c index 4ec63119d67c..86b60e6dab38 100644 --- a/sound/soc/img/img-parallel-out.c +++ b/sound/soc/img/img-parallel-out.c @@ -300,15 +300,14 @@ static const struct of_device_id img_prl_out_of_match[] = { MODULE_DEVICE_TABLE(of, img_prl_out_of_match); static const struct dev_pm_ops img_prl_out_pm_ops = { - SET_RUNTIME_PM_OPS(img_prl_out_suspend, - img_prl_out_resume, NULL) + RUNTIME_PM_OPS(img_prl_out_suspend, img_prl_out_resume, NULL) }; static struct platform_driver img_prl_out_driver = { .driver = { .name = "img-parallel-out", .of_match_table = img_prl_out_of_match, - .pm = &img_prl_out_pm_ops + .pm = pm_ptr(&img_prl_out_pm_ops) }, .probe = img_prl_out_probe, .remove = img_prl_out_dev_remove diff --git a/sound/soc/img/img-spdif-in.c b/sound/soc/img/img-spdif-in.c index 3c513f5b8c54..82295e2508fa 100644 --- a/sound/soc/img/img-spdif-in.c +++ b/sound/soc/img/img-spdif-in.c @@ -817,7 +817,6 @@ static void img_spdif_in_dev_remove(struct platform_device *pdev) img_spdif_in_runtime_suspend(&pdev->dev); } -#ifdef CONFIG_PM_SLEEP static int img_spdif_in_suspend(struct device *dev) { struct img_spdif_in *spdif = dev_get_drvdata(dev); @@ -857,7 +856,6 @@ static int img_spdif_in_resume(struct device *dev) return 0; } -#endif static const struct of_device_id img_spdif_in_of_match[] = { { .compatible = "img,spdif-in" }, @@ -866,16 +864,15 @@ static const struct of_device_id img_spdif_in_of_match[] = { MODULE_DEVICE_TABLE(of, img_spdif_in_of_match); static const struct dev_pm_ops img_spdif_in_pm_ops = { - SET_RUNTIME_PM_OPS(img_spdif_in_runtime_suspend, - img_spdif_in_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(img_spdif_in_suspend, img_spdif_in_resume) + RUNTIME_PM_OPS(img_spdif_in_runtime_suspend, img_spdif_in_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(img_spdif_in_suspend, img_spdif_in_resume) }; static struct platform_driver img_spdif_in_driver = { .driver = { .name = "img-spdif-in", .of_match_table = img_spdif_in_of_match, - .pm = &img_spdif_in_pm_ops + .pm = pm_ptr(&img_spdif_in_pm_ops) }, .probe = img_spdif_in_probe, .remove = img_spdif_in_dev_remove diff --git a/sound/soc/img/img-spdif-out.c b/sound/soc/img/img-spdif-out.c index 402695b5fc41..52f696219ef4 100644 --- a/sound/soc/img/img-spdif-out.c +++ b/sound/soc/img/img-spdif-out.c @@ -409,7 +409,6 @@ static void img_spdif_out_dev_remove(struct platform_device *pdev) img_spdif_out_runtime_suspend(&pdev->dev); } -#ifdef CONFIG_PM_SLEEP static int img_spdif_out_suspend(struct device *dev) { struct img_spdif_out *spdif = dev_get_drvdata(dev); @@ -448,7 +447,7 @@ static int img_spdif_out_resume(struct device *dev) return 0; } -#endif + static const struct of_device_id img_spdif_out_of_match[] = { { .compatible = "img,spdif-out" }, {} @@ -456,16 +455,15 @@ static const struct of_device_id img_spdif_out_of_match[] = { MODULE_DEVICE_TABLE(of, img_spdif_out_of_match); static const struct dev_pm_ops img_spdif_out_pm_ops = { - SET_RUNTIME_PM_OPS(img_spdif_out_runtime_suspend, - img_spdif_out_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(img_spdif_out_suspend, img_spdif_out_resume) + RUNTIME_PM_OPS(img_spdif_out_runtime_suspend, img_spdif_out_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(img_spdif_out_suspend, img_spdif_out_resume) }; static struct platform_driver img_spdif_out_driver = { .driver = { .name = "img-spdif-out", .of_match_table = img_spdif_out_of_match, - .pm = &img_spdif_out_pm_ops + .pm = pm_ptr(&img_spdif_out_pm_ops) }, .probe = img_spdif_out_probe, .remove = img_spdif_out_dev_remove diff --git a/sound/soc/img/pistachio-internal-dac.c b/sound/soc/img/pistachio-internal-dac.c index fdeceb271e7f..ec4f891295c9 100644 --- a/sound/soc/img/pistachio-internal-dac.c +++ b/sound/soc/img/pistachio-internal-dac.c @@ -224,7 +224,6 @@ static void pistachio_internal_dac_remove(struct platform_device *pdev) regulator_disable(dac->supply); } -#ifdef CONFIG_PM static int pistachio_internal_dac_rt_resume(struct device *dev) { struct pistachio_internal_dac *dac = dev_get_drvdata(dev); @@ -251,11 +250,10 @@ static int pistachio_internal_dac_rt_suspend(struct device *dev) return 0; } -#endif static const struct dev_pm_ops pistachio_internal_dac_pm_ops = { - SET_RUNTIME_PM_OPS(pistachio_internal_dac_rt_suspend, - pistachio_internal_dac_rt_resume, NULL) + RUNTIME_PM_OPS(pistachio_internal_dac_rt_suspend, + pistachio_internal_dac_rt_resume, NULL) }; static const struct of_device_id pistachio_internal_dac_of_match[] = { @@ -268,7 +266,7 @@ static struct platform_driver pistachio_internal_dac_plat_driver = { .driver = { .name = "img-pistachio-internal-dac", .of_match_table = pistachio_internal_dac_of_match, - .pm = &pistachio_internal_dac_pm_ops + .pm = pm_ptr(&pistachio_internal_dac_pm_ops) }, .probe = pistachio_internal_dac_probe, .remove = pistachio_internal_dac_remove From patchwork Thu Mar 13 17:41:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015652 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8278C1D8A0A for ; Thu, 13 Mar 2025 17:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887906; cv=none; b=GKHvDxzKMEi0dI8NAlrZkut+TGDS5teuy7ZnmR4JM9AHxMguYdJ5x2X6QbTjR6YnHI9QOLOOM/3nSto5c+8NFcwCE8TtF//1dy6cvNyxC3JXwPK36MClo9ORtqsvbPURT0F8avSDYeNy3m4atwC+zQomQ2q5mw6HXRFM76e2MqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887906; c=relaxed/simple; bh=6/TgnY9/kfDfSNY+8NKAvuw/uyuw2VG7Ab+hkf6jgQ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uoPM7Wp2ke05WRs71slFCgmmTHVUoS11X8GEjbR6MKtUTmqy88Pv14wRQ7ek35M8UW3OvMebuFuGCOPvnCnqEWzhGJeruAxSEsw7eU/zGKq1LtP0fBS4LpDsDg3p0uCD6ZL5fDN1K30wplOZrED8Y5QeyR9npDH7PTF53XB6m4E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=sSfNGhIN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+yPG7Yv9; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=sSfNGhIN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+yPG7Yv9; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="sSfNGhIN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+yPG7Yv9"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="sSfNGhIN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+yPG7Yv9" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 024FB211EE; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1lu7or+POtpK5c2V8q410lxTVFyOPLbOV+lde62C9Zc=; b=sSfNGhIN7hqAaienpNtj1KWggClnGfVQWlMU2ntWRbJIr0xZv/wlK0dkycZs6FMfoxrwxA 7ZezgfTp0JWcAo8NBPNPV6jc6PzgX4ovhJOCxvQmL0DiL+jv+h6iC90YRA56AHPRlbFBu8 dcOMlqRDlZEYeLO8HHdevjWjqbr9W4k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1lu7or+POtpK5c2V8q410lxTVFyOPLbOV+lde62C9Zc=; b=+yPG7Yv91zdScuhknCDG7ZjxnOvT0wj9y8Uo6+gXtR1iEQP88sGGoSQEho7Wys01Gx3VU7 +yWxHrDgXCOHcKAQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1lu7or+POtpK5c2V8q410lxTVFyOPLbOV+lde62C9Zc=; b=sSfNGhIN7hqAaienpNtj1KWggClnGfVQWlMU2ntWRbJIr0xZv/wlK0dkycZs6FMfoxrwxA 7ZezgfTp0JWcAo8NBPNPV6jc6PzgX4ovhJOCxvQmL0DiL+jv+h6iC90YRA56AHPRlbFBu8 dcOMlqRDlZEYeLO8HHdevjWjqbr9W4k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1lu7or+POtpK5c2V8q410lxTVFyOPLbOV+lde62C9Zc=; b=+yPG7Yv91zdScuhknCDG7ZjxnOvT0wj9y8Uo6+gXtR1iEQP88sGGoSQEho7Wys01Gx3VU7 +yWxHrDgXCOHcKAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CEFF713A24; Thu, 13 Mar 2025 17:42:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id IHfiMOwY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:04 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Cezary Rojewski Subject: [PATCH 62/89] ASoC: intel: avs: Convert to RUNTIE_PM_OPS() Date: Thu, 13 Mar 2025 18:41:07 +0100 Message-ID: <20250313174139.29942-63-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Cezary Rojewski Signed-off-by: Takashi Iwai --- sound/soc/intel/avs/core.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c index 0e750e9e01d9..8fbf33e30dfc 100644 --- a/sound/soc/intel/avs/core.c +++ b/sound/soc/intel/avs/core.c @@ -612,7 +612,7 @@ static int avs_suspend_standby(struct avs_dev *adev) return 0; } -static int __maybe_unused avs_suspend_common(struct avs_dev *adev, bool low_power) +static int avs_suspend_common(struct avs_dev *adev, bool low_power) { struct hdac_bus *bus = &adev->base.core; int ret; @@ -673,7 +673,7 @@ static int avs_resume_standby(struct avs_dev *adev) return 0; } -static int __maybe_unused avs_resume_common(struct avs_dev *adev, bool low_power, bool purge) +static int avs_resume_common(struct avs_dev *adev, bool low_power, bool purge) { struct hdac_bus *bus = &adev->base.core; int ret; @@ -696,41 +696,41 @@ static int __maybe_unused avs_resume_common(struct avs_dev *adev, bool low_power return 0; } -static int __maybe_unused avs_suspend(struct device *dev) +static int avs_suspend(struct device *dev) { return avs_suspend_common(to_avs_dev(dev), true); } -static int __maybe_unused avs_resume(struct device *dev) +static int avs_resume(struct device *dev) { return avs_resume_common(to_avs_dev(dev), true, true); } -static int __maybe_unused avs_runtime_suspend(struct device *dev) +static int avs_runtime_suspend(struct device *dev) { return avs_suspend_common(to_avs_dev(dev), true); } -static int __maybe_unused avs_runtime_resume(struct device *dev) +static int avs_runtime_resume(struct device *dev) { return avs_resume_common(to_avs_dev(dev), true, false); } -static int __maybe_unused avs_freeze(struct device *dev) +static int avs_freeze(struct device *dev) { return avs_suspend_common(to_avs_dev(dev), false); } -static int __maybe_unused avs_thaw(struct device *dev) +static int avs_thaw(struct device *dev) { return avs_resume_common(to_avs_dev(dev), false, true); } -static int __maybe_unused avs_poweroff(struct device *dev) +static int avs_poweroff(struct device *dev) { return avs_suspend_common(to_avs_dev(dev), false); } -static int __maybe_unused avs_restore(struct device *dev) +static int avs_restore(struct device *dev) { return avs_resume_common(to_avs_dev(dev), false, true); } @@ -742,7 +742,7 @@ static const struct dev_pm_ops avs_dev_pm = { .thaw = avs_thaw, .poweroff = avs_poweroff, .restore = avs_restore, - SET_RUNTIME_PM_OPS(avs_runtime_suspend, avs_runtime_resume, NULL) + RUNTIME_PM_OPS(avs_runtime_suspend, avs_runtime_resume, NULL) }; static const struct avs_sram_spec skl_sram_spec = { @@ -893,7 +893,7 @@ static struct pci_driver avs_pci_driver = { .shutdown = avs_pci_shutdown, .dev_groups = avs_attr_groups, .driver = { - .pm = &avs_dev_pm, + .pm = pm_ptr(&avs_dev_pm), }, }; module_pci_driver(avs_pci_driver); From patchwork Thu Mar 13 17:41:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015653 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE7F9186284 for ; Thu, 13 Mar 2025 17:45:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887912; cv=none; b=LbTiYNWh/o29p5NjsWAmnww7RNL+h6Le5zk2GoC5nhl9prza0u8kuU3p5ZVyvVmRrvCE4FjF6LLFVKRx3gjqxY3GFGMeOfOmuiZgEHWwxOiC+mSxX/R1YxW6l7ErjpmgaebwlFcmnR4IRl0HuxH3MPtEErWIFMyd7/NjZikHggI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887912; c=relaxed/simple; bh=hITV6EfDIKhaEcwBeMvybUAMHUwSTeFaMPF4sM3YWwQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b7dCCtH8ervy7AjCNrZhGS7XE9PJSEZzIuXN9yUKc4tCx75JaiPGoMNPBS2/4+JJja+Uo7nVUgbt+Yx5bwW8xpVbq1STVct8qAIGBNL6MlYwOpTRJWdWL4aA755/LtX1GJnZdzRjNDKNj2MbD/5cdmefVI1MRtwVoNxh5NWzvgo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=c8Y8/q94; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HywAc30S; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=c8Y8/q94; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HywAc30S; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="c8Y8/q94"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HywAc30S"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="c8Y8/q94"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HywAc30S" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 31353211EF; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1KjvMoe1wHFv2QKUzEtDqfZ57yO6tquEj0mJI+MFAm0=; b=c8Y8/q94aiXWEa2DIbi4IWHM8Lc954U+HtWzplJrIMA8hw63Nu4wV2GDMV7d3pcXPV6QvD gqtiVbRzf3V2zgpskvP6kDUk6j9LWuwNel2Ez2G7f3JYHzx+kDAl5r8UBnGuESOgMBDe6V OM3lKcSqnLAZz4o5xBAA2IFMTKSsUwE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1KjvMoe1wHFv2QKUzEtDqfZ57yO6tquEj0mJI+MFAm0=; b=HywAc30S+zZgJ8kGRKNrippMo4VeK8VM6F1ZF5YQBqqif0R06sFg/+p1Yw4/QQD+Z+TY+F ASjpex/C5OhQaHDw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="c8Y8/q94"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=HywAc30S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1KjvMoe1wHFv2QKUzEtDqfZ57yO6tquEj0mJI+MFAm0=; b=c8Y8/q94aiXWEa2DIbi4IWHM8Lc954U+HtWzplJrIMA8hw63Nu4wV2GDMV7d3pcXPV6QvD gqtiVbRzf3V2zgpskvP6kDUk6j9LWuwNel2Ez2G7f3JYHzx+kDAl5r8UBnGuESOgMBDe6V OM3lKcSqnLAZz4o5xBAA2IFMTKSsUwE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1KjvMoe1wHFv2QKUzEtDqfZ57yO6tquEj0mJI+MFAm0=; b=HywAc30S+zZgJ8kGRKNrippMo4VeK8VM6F1ZF5YQBqqif0R06sFg/+p1Yw4/QQD+Z+TY+F ASjpex/C5OhQaHDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 09DC9139D2; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id KOLvAO0Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:05 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Cezary Rojewski Subject: [PATCH 63/89] ASoC: intel: catpt: Convert to RUNTIE_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:08 +0100 Message-ID: <20250313174139.29942-64-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 31353211EF X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Cezary Rojewski Signed-off-by: Takashi Iwai --- sound/soc/intel/catpt/device.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c index 2aa637124bec..faa916f40069 100644 --- a/sound/soc/intel/catpt/device.c +++ b/sound/soc/intel/catpt/device.c @@ -28,7 +28,7 @@ #define CREATE_TRACE_POINTS #include "trace.h" -static int __maybe_unused catpt_suspend(struct device *dev) +static int catpt_suspend(struct device *dev) { struct catpt_dev *cdev = dev_get_drvdata(dev); struct dma_chan *chan; @@ -72,7 +72,7 @@ static int __maybe_unused catpt_suspend(struct device *dev) return catpt_dsp_power_down(cdev); } -static int __maybe_unused catpt_resume(struct device *dev) +static int catpt_resume(struct device *dev) { struct catpt_dev *cdev = dev_get_drvdata(dev); int ret, i; @@ -106,7 +106,7 @@ static int __maybe_unused catpt_resume(struct device *dev) return 0; } -static int __maybe_unused catpt_runtime_suspend(struct device *dev) +static int catpt_runtime_suspend(struct device *dev) { if (!try_module_get(dev->driver->owner)) { dev_info(dev, "module unloading, skipping suspend\n"); @@ -117,14 +117,14 @@ static int __maybe_unused catpt_runtime_suspend(struct device *dev) return catpt_suspend(dev); } -static int __maybe_unused catpt_runtime_resume(struct device *dev) +static int catpt_runtime_resume(struct device *dev) { return catpt_resume(dev); } static const struct dev_pm_ops catpt_dev_pm = { - SET_SYSTEM_SLEEP_PM_OPS(catpt_suspend, catpt_resume) - SET_RUNTIME_PM_OPS(catpt_runtime_suspend, catpt_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(catpt_suspend, catpt_resume) + RUNTIME_PM_OPS(catpt_runtime_suspend, catpt_runtime_resume, NULL) }; /* machine board owned by CATPT is removed with this hook */ @@ -378,7 +378,7 @@ static struct platform_driver catpt_acpi_driver = { .driver = { .name = "intel_catpt", .acpi_match_table = catpt_ids, - .pm = &catpt_dev_pm, + .pm = pm_ptr(&catpt_dev_pm), .dev_groups = catpt_attr_groups, }, }; From patchwork Thu Mar 13 17:41:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015651 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD1A21DDA24 for ; Thu, 13 Mar 2025 17:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887906; cv=none; b=RYcN2YxeT8W61ZCMeYI3+V6BHtU5VoRNvZj2cEmU3eESlAVqcWkjr+9Zr4rHngOiDN9xfzuo2RXQCBV6xYL41FThAqlfKKHD68KcKcYWqEMHzoTlJIKuFOVtR9GgM0yjUv3WKyXBwQWVh8uLVbiLM1dopJBM8MYFS+CXO8E9FS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887906; c=relaxed/simple; bh=nJP7mPfg3vrsEit8HXXIcQYIbL6PXIzfZ1aVAEMSxcE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YzBNrTBV1fl8ATTVJDDea5O0ThiSZetuZSjV8wVhjOKS7nhCJACEk26sRYSOL0UgnHFt1jRb/3KY455+YJYieIQ2BJZm6va5wZJcf8kWFcMDh7aAGOl0m+k/NIb249h2eWXZ6LUU+nSYSPLWRIMlB5X7LflcOObJBKCr7uPPG88= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cJLB9wfA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=3Bwi9EP5; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cJLB9wfA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=3Bwi9EP5; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cJLB9wfA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3Bwi9EP5"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cJLB9wfA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3Bwi9EP5" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5D6551F78F; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vu3EeT4E6q+UAR4EwSSPaFn0r6G5kUkIz3QytbgkCfk=; b=cJLB9wfAC8cDMUy6tPyBU6yYgd1qDDh7RVyUS0J+oSPXlyz9ldk68RSxQ824sWJ9fJn730 zCZ4gxMGYchL4O9R7rLotME9AIpYyv22taWgT+F1wpqfxe3+0D7aKcA1CkWBCP3DNeSmxM F89tR+ODVmrd/jJeLwElX9DklG4NfR0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vu3EeT4E6q+UAR4EwSSPaFn0r6G5kUkIz3QytbgkCfk=; b=3Bwi9EP5ILLvfk/IDk3FGMM3ZkJCmuyiGDL6vbI6LCYF9TnbNKhizOP50WcNzSRqPUGf8F +1hnz1O6yXZ5qdAw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=cJLB9wfA; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=3Bwi9EP5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vu3EeT4E6q+UAR4EwSSPaFn0r6G5kUkIz3QytbgkCfk=; b=cJLB9wfAC8cDMUy6tPyBU6yYgd1qDDh7RVyUS0J+oSPXlyz9ldk68RSxQ824sWJ9fJn730 zCZ4gxMGYchL4O9R7rLotME9AIpYyv22taWgT+F1wpqfxe3+0D7aKcA1CkWBCP3DNeSmxM F89tR+ODVmrd/jJeLwElX9DklG4NfR0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vu3EeT4E6q+UAR4EwSSPaFn0r6G5kUkIz3QytbgkCfk=; b=3Bwi9EP5ILLvfk/IDk3FGMM3ZkJCmuyiGDL6vbI6LCYF9TnbNKhizOP50WcNzSRqPUGf8F +1hnz1O6yXZ5qdAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3706E13A24; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id oOcRDO0Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:05 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 64/89] ASoC: mediatek: mt2701: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:09 +0100 Message-ID: <20250313174139.29942-65-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 5D6551F78F X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c index 5f11bc5438bd..fcae38135d93 100644 --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c @@ -1462,15 +1462,15 @@ static const struct of_device_id mt2701_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt2701_afe_pcm_dt_match); static const struct dev_pm_ops mt2701_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt2701_afe_runtime_suspend, - mt2701_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt2701_afe_runtime_suspend, + mt2701_afe_runtime_resume, NULL) }; static struct platform_driver mt2701_afe_pcm_driver = { .driver = { .name = "mt2701-audio", .of_match_table = mt2701_afe_pcm_dt_match, - .pm = &mt2701_afe_pm_ops, + .pm = pm_ptr(&mt2701_afe_pm_ops), }, .probe = mt2701_afe_pcm_dev_probe, .remove = mt2701_afe_pcm_dev_remove, From patchwork Thu Mar 13 17:41:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015655 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ECDA1AF0BB for ; Thu, 13 Mar 2025 17:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887918; cv=none; b=qLZX66FDHqZLim7/kc8lUDGFYzI7J2teG4kSmozbo3UChSThKXulqGg2Ch+jgWVpm7nCEQu3mDK/BMpBbQgfSYP4YQqoWckHonA6Bk4q/8RQoBkW84x2BzWfvoJNYCTZdfd47ElyIvFs8azwxjQ4klvNW0gtwpUvTdz8+dWGU8c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887918; c=relaxed/simple; bh=BEL6JiUdbowwg62DkWoNPPN+GG0Vx1XyJiulOabQRiQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SgPSY1LY0Dsvm+19dXhOc4mRc6Sv+ahT/YkW8el/SM32GWW36soPOvnegautm444Vy7dLiO7wEfvVtpkezRT5TXBwV3VcMfXo+49JcyOPNfjaLcxp32K+hTaS5J5Wtqo2sWiUBNvEvfmKRhKe7iqjls2qRHrbWJCXwjfU9jmM74= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=L0H84jDW; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=8cxDV44N; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=L0H84jDW; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=8cxDV44N; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="L0H84jDW"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="8cxDV44N"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="L0H84jDW"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="8cxDV44N" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 85097211F1; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DOWPK3PkqKpQ9lPEXJg9kZ1nGZemit5HYJ8VlYr5kPw=; b=L0H84jDWTeiu4UXzx6Pg+b9F1dci9Us/m2W1/I8gWS7zbL9a8uc+l5u29ZZgloBaYwH2m2 J3jrszL5mLAESMmMAoMtJR/NW6cwZ4ceWTjqG1oXoVqDUbyqpVhn9kuGSw0H+GoqaK6RIH JVgB/zPQgLJeAtbqPApo0ZQA7M30rvk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DOWPK3PkqKpQ9lPEXJg9kZ1nGZemit5HYJ8VlYr5kPw=; b=8cxDV44NdKp9rDFRSFaJf45tSANDeTuteLSH0kR5wHIwIh0UN7xQq/m4cjemfUwJw0LN5F s7UYBK0YrncfDTBg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=L0H84jDW; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=8cxDV44N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DOWPK3PkqKpQ9lPEXJg9kZ1nGZemit5HYJ8VlYr5kPw=; b=L0H84jDWTeiu4UXzx6Pg+b9F1dci9Us/m2W1/I8gWS7zbL9a8uc+l5u29ZZgloBaYwH2m2 J3jrszL5mLAESMmMAoMtJR/NW6cwZ4ceWTjqG1oXoVqDUbyqpVhn9kuGSw0H+GoqaK6RIH JVgB/zPQgLJeAtbqPApo0ZQA7M30rvk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DOWPK3PkqKpQ9lPEXJg9kZ1nGZemit5HYJ8VlYr5kPw=; b=8cxDV44NdKp9rDFRSFaJf45tSANDeTuteLSH0kR5wHIwIh0UN7xQq/m4cjemfUwJw0LN5F s7UYBK0YrncfDTBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 64359139D2; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id GDsnF+0Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:05 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 65/89] ASoC: mediatek: mt6797: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:10 +0100 Message-ID: <20250313174139.29942-66-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 85097211F1 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c index 9159b42adf6a..f62a32f2f2b6 100644 --- a/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c +++ b/sound/soc/mediatek/mt6797/mt6797-afe-pcm.c @@ -879,15 +879,15 @@ static const struct of_device_id mt6797_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt6797_afe_pcm_dt_match); static const struct dev_pm_ops mt6797_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt6797_afe_runtime_suspend, - mt6797_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt6797_afe_runtime_suspend, + mt6797_afe_runtime_resume, NULL) }; static struct platform_driver mt6797_afe_pcm_driver = { .driver = { .name = "mt6797-audio", .of_match_table = mt6797_afe_pcm_dt_match, - .pm = &mt6797_afe_pm_ops, + .pm = pm_ptr(&mt6797_afe_pm_ops), }, .probe = mt6797_afe_pcm_dev_probe, .remove = mt6797_afe_pcm_dev_remove, From patchwork Thu Mar 13 17:41:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015658 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 060498635C for ; Thu, 13 Mar 2025 17:45:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887924; cv=none; b=midFsrp8ZPuHuFxXb3C1UPdmCUDLAYCmqyTcg/g4Zrjf64zgR3uoP32fzQz58n/nV4Di3zYI1cNGUz3SSwsbyQ2506Jo7+ZhWU4MT94U63vfV1xRAkD180oiGe6ThDIO9COCLoE0J1+Ac7MRXJEdg6xOXgESXLYDbo/145wiadY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887924; c=relaxed/simple; bh=btTc6SYsAQHTMRU68pJ76wGW/9C3RhyklakzJ8UYHRI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wo5rOScRQz/IZZTb4aNk82TD0ONBAJsGuns3PblrO+tZWjwTE1nZDdvLFdrHRLHPUDPxzjw8uJq9eY8C6EECmJaxV/MegkUsq7LNJuUJA3Un+PvgyRpV+YU02m7I8cdeBJ/dOfT8EW3T2uKjjWMBevUDwjWsZN7XMXsGjcy6+b0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mdKd52ah; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=1XUEx9iz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mdKd52ah; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=1XUEx9iz; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mdKd52ah"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="1XUEx9iz"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mdKd52ah"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="1XUEx9iz" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AC50B211F2; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JEJKSvrzcw4NvNtYTzmJaXBGKgIy+riAeuxgNNiHCTQ=; b=mdKd52ahjTPJAp5ECTkPlye/x90SU3Icja4I8erIMWJof72edtY2pMfLp7ifIPgpK8EVwj TFxWnUbVoaWyFkrRGgij+Ars8Eq/dxaT2YE15+0OtVL7G9qe9Qsw5vTEbQoasVh/PvDaHE PXPrlxs8kN4leFCqJj1x1xPxa2rsG1Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JEJKSvrzcw4NvNtYTzmJaXBGKgIy+riAeuxgNNiHCTQ=; b=1XUEx9izVV6Q+6QIyoxXFMYFGd5Ls6gfqzH9MsECY2jHcomu8HV8OX7ici4oriTvdkE/pZ Pi9bTz1SEgkqVHDA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JEJKSvrzcw4NvNtYTzmJaXBGKgIy+riAeuxgNNiHCTQ=; b=mdKd52ahjTPJAp5ECTkPlye/x90SU3Icja4I8erIMWJof72edtY2pMfLp7ifIPgpK8EVwj TFxWnUbVoaWyFkrRGgij+Ars8Eq/dxaT2YE15+0OtVL7G9qe9Qsw5vTEbQoasVh/PvDaHE PXPrlxs8kN4leFCqJj1x1xPxa2rsG1Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JEJKSvrzcw4NvNtYTzmJaXBGKgIy+riAeuxgNNiHCTQ=; b=1XUEx9izVV6Q+6QIyoxXFMYFGd5Ls6gfqzH9MsECY2jHcomu8HV8OX7ici4oriTvdkE/pZ Pi9bTz1SEgkqVHDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8C15013A24; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ADrXIO0Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:05 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 66/89] ASoC: mediatek: mt7986: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:11 +0100 Message-ID: <20250313174139.29942-67-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt7986/mt7986-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c b/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c index 7db090414d59..7a6ad9116e55 100644 --- a/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c +++ b/sound/soc/mediatek/mt7986/mt7986-afe-pcm.c @@ -589,15 +589,15 @@ static const struct of_device_id mt7986_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt7986_afe_pcm_dt_match); static const struct dev_pm_ops mt7986_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt7986_afe_runtime_suspend, - mt7986_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt7986_afe_runtime_suspend, + mt7986_afe_runtime_resume, NULL) }; static struct platform_driver mt7986_afe_pcm_driver = { .driver = { .name = "mt7986-audio", .of_match_table = mt7986_afe_pcm_dt_match, - .pm = &mt7986_afe_pm_ops, + .pm = pm_ptr(&mt7986_afe_pm_ops), }, .probe = mt7986_afe_pcm_dev_probe, .remove = mt7986_afe_pcm_dev_remove, From patchwork Thu Mar 13 17:41:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015659 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 778D71E491B for ; Thu, 13 Mar 2025 17:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887929; cv=none; b=pLqdYuir0mTdcjjwMfQCgTpF1YdXD2UQucoieVrsQ+OGyIBGm+jqX9VGCB6kuJJcVybH9oE7COfWX9Ssco9eGmwcHsje3YTrdfR1fpJdlS51YzgCOmWh5YTPVRMwSkRFZVt7xxqdDz844a53lQ7YfITpYsjMA14Z/4pop0fARqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887929; c=relaxed/simple; bh=ts0sK6RDM7p2iinds6quDFImQJWku1qBEHw6jDoz0CQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CSwj88DE7uhUdn4GglTQALL97po028xCGnnxRREQvZB1qUp5/4hIPTY55OfBwt1VxfaoEMYl55xo5qs5ZVxSlql8J7urzYvHH4bfGQd1OSl8qbDJkZn7QZ1KkI0m2ntbU4VislyOQ71s6cw8BgcZZ08rY2le4+uPyN+YYtNEeik= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=aJ5qVs2h; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=a0W19XRN; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=aJ5qVs2h; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=a0W19XRN; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="aJ5qVs2h"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="a0W19XRN"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="aJ5qVs2h"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="a0W19XRN" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D846C211F5; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GrRbrRs8yjF39jRzqLY81ETFBjqhrdftWgiNCid+rCQ=; b=aJ5qVs2hg+J9T740QxzLO7MDQLkhOYqJajtuZojHiJYKozQoE9vXm/26yLS45nRG87KCU4 QyVabvEaSCi9fZbU8hoQTz/nT1tuG/qEJo+SyNUmPTTyMVJbOOgaXWRdokPs9u4syIkvRI djzQFnsWiw9eJfxxTNqpGUQ8rVCswWc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GrRbrRs8yjF39jRzqLY81ETFBjqhrdftWgiNCid+rCQ=; b=a0W19XRNZsXLMo1MGx1hsOqWnqY2zjL0NG92BR2ZGlACcQWout1a5KC/nTVsVfgz+8ucVc bt2/pGIVMNuBaZDg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GrRbrRs8yjF39jRzqLY81ETFBjqhrdftWgiNCid+rCQ=; b=aJ5qVs2hg+J9T740QxzLO7MDQLkhOYqJajtuZojHiJYKozQoE9vXm/26yLS45nRG87KCU4 QyVabvEaSCi9fZbU8hoQTz/nT1tuG/qEJo+SyNUmPTTyMVJbOOgaXWRdokPs9u4syIkvRI djzQFnsWiw9eJfxxTNqpGUQ8rVCswWc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887725; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GrRbrRs8yjF39jRzqLY81ETFBjqhrdftWgiNCid+rCQ=; b=a0W19XRNZsXLMo1MGx1hsOqWnqY2zjL0NG92BR2ZGlACcQWout1a5KC/nTVsVfgz+8ucVc bt2/pGIVMNuBaZDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B2B93139D2; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id gMhkKu0Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:05 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 67/89] ASoC: mediatek: mt8173: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:12 +0100 Message-ID: <20250313174139.29942-68-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c index 03250273ea9c..04ed0cfec174 100644 --- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c +++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c @@ -1212,15 +1212,15 @@ static const struct of_device_id mt8173_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt8173_afe_pcm_dt_match); static const struct dev_pm_ops mt8173_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt8173_afe_runtime_suspend, - mt8173_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt8173_afe_runtime_suspend, + mt8173_afe_runtime_resume, NULL) }; static struct platform_driver mt8173_afe_pcm_driver = { .driver = { .name = "mt8173-afe-pcm", .of_match_table = mt8173_afe_pcm_dt_match, - .pm = &mt8173_afe_pm_ops, + .pm = pm_ptr(&mt8173_afe_pm_ops), }, .probe = mt8173_afe_pcm_dev_probe, .remove = mt8173_afe_pcm_dev_remove, From patchwork Thu Mar 13 17:41:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015661 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6998029A9 for ; Thu, 13 Mar 2025 17:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887935; cv=none; b=HO92BrcFoxcSy+qsWaWt12LaocPoy6I8dgoGqmJuzjM8KR2x3BXdxIEQlCAgwna9rcLcKfJawyKn4T64NDG5bqVJnIsVZ0EiJRMYuXX2X2uY6Sp5k05B5P6DaIedC4vXhu9pPe+B2ztd8E0txlMYCmfqsC+v5xMbFQzODNgULbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887935; c=relaxed/simple; bh=kWG4EMlqwHMCDZhtS+ktGQ63fdbIrk+uXLol54ifXNA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p32IdqnW7IjNzMsaJxk5gCuZhapZXGzufVMCzmGoeC3YKBLUiTcXNvAnAHtbExxusbq9rgIdP2DszDnzrvLBwSOqcWqCy/9Yg8kaXk/NrXTk0OW1/FZuwwU5tUauKeh9CHm86xPdXa8N+aDAUTGuWKbSMjrRuKkSeuoOU0gROuc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=XaGRZlpz; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=9QhLoHZ5; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=XaGRZlpz; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=9QhLoHZ5; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XaGRZlpz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="9QhLoHZ5"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XaGRZlpz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="9QhLoHZ5" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0EAE4211F6; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vT5zpVee2NoaX9XJftb4uCq3lhHPw0uk6AmnrSqAfiE=; b=XaGRZlpzCoh6PJCy/JfFQFCl6FExOttVKjB4EM1ao0zwM1TLEZlGxw0+vv7LpATZdqALxO 9tnWPeXjIugLBJgkeYOZDv0DM3eciXvg1/0apFHBHa8nJIu1fGZcJPRxQcFVIeC96AL4vk Klnduj3pdk5FQ/4G94SCdOWaRvm1Vfk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vT5zpVee2NoaX9XJftb4uCq3lhHPw0uk6AmnrSqAfiE=; b=9QhLoHZ5Xo6kq2GXzOB0YUDkPJoznloelJAMC/0A8uZebvH2Qjq7L4W5U8n55b8+qPeuzJ VsCiQ1rZgD8Rn9Dg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vT5zpVee2NoaX9XJftb4uCq3lhHPw0uk6AmnrSqAfiE=; b=XaGRZlpzCoh6PJCy/JfFQFCl6FExOttVKjB4EM1ao0zwM1TLEZlGxw0+vv7LpATZdqALxO 9tnWPeXjIugLBJgkeYOZDv0DM3eciXvg1/0apFHBHa8nJIu1fGZcJPRxQcFVIeC96AL4vk Klnduj3pdk5FQ/4G94SCdOWaRvm1Vfk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vT5zpVee2NoaX9XJftb4uCq3lhHPw0uk6AmnrSqAfiE=; b=9QhLoHZ5Xo6kq2GXzOB0YUDkPJoznloelJAMC/0A8uZebvH2Qjq7L4W5U8n55b8+qPeuzJ VsCiQ1rZgD8Rn9Dg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E008413A24; Thu, 13 Mar 2025 17:42:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id wEh7Ne0Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:05 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 68/89] ASoC: mediatek: mt8183: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:13 +0100 Message-ID: <20250313174139.29942-69-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c index 3f377ba4ad53..d083b4bf0f95 100644 --- a/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c +++ b/sound/soc/mediatek/mt8183/mt8183-afe-pcm.c @@ -1257,15 +1257,15 @@ static const struct of_device_id mt8183_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt8183_afe_pcm_dt_match); static const struct dev_pm_ops mt8183_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt8183_afe_runtime_suspend, - mt8183_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt8183_afe_runtime_suspend, + mt8183_afe_runtime_resume, NULL) }; static struct platform_driver mt8183_afe_pcm_driver = { .driver = { .name = "mt8183-audio", .of_match_table = mt8183_afe_pcm_dt_match, - .pm = &mt8183_afe_pm_ops, + .pm = pm_ptr(&mt8183_afe_pm_ops), }, .probe = mt8183_afe_pcm_dev_probe, .remove = mt8183_afe_pcm_dev_remove, From patchwork Thu Mar 13 17:41:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015654 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C6F41AF0BB for ; Thu, 13 Mar 2025 17:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887912; cv=none; b=B6vRg9hb1TjIoeIZsPbbZ1Jbp06dZrTLoxAdatmFauloVFHP6Z6qSHmTQjYJRtIZsEBk0PNZ8Gnvlev31RAUbEC9WGVVlK80bsDxHkURMLORJK6zcZ5KwPyvX6d7Y2DtfCRxQ+M6hs/uiBVELY55W66ut6eGjWTY0EKTmTFGroI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887912; c=relaxed/simple; bh=kPKbuJU8FAqrDMdQPwl945lzrMoRwgLKWgTX/4r9Ftg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YsOijNeqaGXD224O3VXOJyCI0+UA1HJy9dZfyquglSIktPOHSJkKE4GRKLR+ZNsGdek4hyJVjl7/xB6F9onw5mYhEk4let5SuD8zTt2EltKjlhVw3uVqeF9tUvQv90+SOvQX56agOC03tUAv1p/l/F2XV4ngyJvVmrAgfV6HM2g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=X6wRDs9b; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=z9Il5oWr; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=X6wRDs9b; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=z9Il5oWr; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="X6wRDs9b"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="z9Il5oWr"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="X6wRDs9b"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="z9Il5oWr" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 34ED71F7B0; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CSScpBWE25CSqQwc9eVVUNU30mXvX4pAcEM4wheegBE=; b=X6wRDs9bEYEjEBm+j2FQjIpEM0VZgrC4sdWSFoJboxAisPXstiHo6zpL+7SEWixb53PF3s lqGO/6/1oSffIkmhE0VsrfiVujjJRujaGC5sdLSSfAwM6BDADnmSvWtBK4ejAO/GjRPeOE 1gXB1iPkwJ0rQutvBxJ1F9VahUjJSUQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CSScpBWE25CSqQwc9eVVUNU30mXvX4pAcEM4wheegBE=; b=z9Il5oWraw9xn5l/qINwCukK6H7u/PEDipQQ4UTb3LCrCK0Cmtcw1bsjvMeVVigEPulEOB 1Dk0CVCW1pgY2AAw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=X6wRDs9b; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=z9Il5oWr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CSScpBWE25CSqQwc9eVVUNU30mXvX4pAcEM4wheegBE=; b=X6wRDs9bEYEjEBm+j2FQjIpEM0VZgrC4sdWSFoJboxAisPXstiHo6zpL+7SEWixb53PF3s lqGO/6/1oSffIkmhE0VsrfiVujjJRujaGC5sdLSSfAwM6BDADnmSvWtBK4ejAO/GjRPeOE 1gXB1iPkwJ0rQutvBxJ1F9VahUjJSUQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CSScpBWE25CSqQwc9eVVUNU30mXvX4pAcEM4wheegBE=; b=z9Il5oWraw9xn5l/qINwCukK6H7u/PEDipQQ4UTb3LCrCK0Cmtcw1bsjvMeVVigEPulEOB 1Dk0CVCW1pgY2AAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 147BD139D2; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QDO7A+4Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:06 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 69/89] ASoC: mediatek: mt8186: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:14 +0100 Message-ID: <20250313174139.29942-70-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 34ED71F7B0 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c index bafbef96a42d..db7c93401bee 100644 --- a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c +++ b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c @@ -2978,15 +2978,15 @@ static const struct of_device_id mt8186_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt8186_afe_pcm_dt_match); static const struct dev_pm_ops mt8186_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt8186_afe_runtime_suspend, - mt8186_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt8186_afe_runtime_suspend, + mt8186_afe_runtime_resume, NULL) }; static struct platform_driver mt8186_afe_pcm_driver = { .driver = { .name = "mt8186-audio", .of_match_table = mt8186_afe_pcm_dt_match, - .pm = &mt8186_afe_pm_ops, + .pm = pm_ptr(&mt8186_afe_pm_ops), }, .probe = mt8186_afe_pcm_dev_probe, }; From patchwork Thu Mar 13 17:41:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015663 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 659DD1D95B4 for ; Thu, 13 Mar 2025 17:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887941; cv=none; b=GpX44w5i7MXkU98kQZCgFXh9Oo84NhIsG4Fs9wklrx6MqOo9TmdHDPVT4sBkt81NiYoArpPNGjDzX4NuaHa9ACLvEpGePBVMJr4jz/MRuXlZpD7hWMMS5+AXrbKDINRV3HrGD7wOfmNmRkMTIdvaBRYdw6fVc6PdQ3NLNEsY5Ms= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887941; c=relaxed/simple; bh=tCY4sQlVg3kirLaONS7EvDUrv0BpH+7z/A/07w3BfYI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ettxDYpCN7ehLOg692KKOuA6Qx40DYrkggWA+vzJodioAYYuM1iSEN6w8IA+QSlIGCkDqoelujZ4nBSBqQ1ih7VZ6knjnai5eZwWjc+V+grfaiVGbNdeRsspnAMwczRwk66BxmEJxU7NIeAI8GCq4kOlDUYVtnxk64Xct4q0KvE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ikZkS4HT; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=NE3RzTG+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ikZkS4HT; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=NE3RzTG+; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ikZkS4HT"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="NE3RzTG+"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ikZkS4HT"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="NE3RzTG+" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5B2FC211F7; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3S7UJtH/gQw9A8j3D7NpET8u9aGTAjQx0uYa4SukWA0=; b=ikZkS4HT4CoesGh/fth6RsePusZJKMx29AjxWaDsgEg9JAoIYvQLOwm0NaraiUdjXRMjJB aF8JhT38WiukrSm2cU/nN0CSBm61ZRyeYZLBxFMqdzW2/4xGgtzOqsI2GSRBrHY/5kNUYW Mnh28UljMMBT14VF2xJBbM5mpKxcnKE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3S7UJtH/gQw9A8j3D7NpET8u9aGTAjQx0uYa4SukWA0=; b=NE3RzTG+tA/vwFYzlM1cLvtC0Fig7uoRfhG4MT76cpua6D+Bxy5T1cuOj65F1viMXeLz6t CBOzHS5ZJ20brvAg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ikZkS4HT; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=NE3RzTG+ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3S7UJtH/gQw9A8j3D7NpET8u9aGTAjQx0uYa4SukWA0=; b=ikZkS4HT4CoesGh/fth6RsePusZJKMx29AjxWaDsgEg9JAoIYvQLOwm0NaraiUdjXRMjJB aF8JhT38WiukrSm2cU/nN0CSBm61ZRyeYZLBxFMqdzW2/4xGgtzOqsI2GSRBrHY/5kNUYW Mnh28UljMMBT14VF2xJBbM5mpKxcnKE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3S7UJtH/gQw9A8j3D7NpET8u9aGTAjQx0uYa4SukWA0=; b=NE3RzTG+tA/vwFYzlM1cLvtC0Fig7uoRfhG4MT76cpua6D+Bxy5T1cuOj65F1viMXeLz6t CBOzHS5ZJ20brvAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3AE5813A24; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id mHAmDe4Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:06 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 70/89] ASoC: mediatek: mt8188: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:15 +0100 Message-ID: <20250313174139.29942-71-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 5B2FC211F7 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c index a2b57e00ff4e..ac4fdf8ba78f 100644 --- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c +++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c @@ -3381,15 +3381,15 @@ static const struct of_device_id mt8188_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt8188_afe_pcm_dt_match); static const struct dev_pm_ops mt8188_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt8188_afe_runtime_suspend, - mt8188_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt8188_afe_runtime_suspend, + mt8188_afe_runtime_resume, NULL) }; static struct platform_driver mt8188_afe_pcm_driver = { .driver = { .name = "mt8188-audio", .of_match_table = mt8188_afe_pcm_dt_match, - .pm = &mt8188_afe_pm_ops, + .pm = pm_ptr(&mt8188_afe_pm_ops), }, .probe = mt8188_afe_pcm_dev_probe, }; From patchwork Thu Mar 13 17:41:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015665 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3FF118A6C1 for ; Thu, 13 Mar 2025 17:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887948; cv=none; b=LZC9+uxErg85gEJONJZEdyN2UcOYdLaWmX0E2m7Qy1l2vzIad1TLK+HKR00lGTSCZBPvxxaI3H23Wpo9tIo+zNfui4OuHlTeSTsHW7hDl02cub18WAd/Ww8OrznSqj6zselP5YiOpcl6Q6UohgOpFNtnmab1vJy3QgMoWxnLSIc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887948; c=relaxed/simple; bh=eHIKEA2KHugNpYbSKyn3zrrERi3WaeAq9hxNzllb+6k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j/VRJS7fB5M6ON8E8Im86iRW1dkFnXv0st6lq56bEH4gqpAV4qx+mLTkr2bzNrh7jjFQKBhH4fMH7BqKfgPQ6H2KVyQ9udv7PYWxRHmwqMlBLdi3abC72ZPqMszT8EweEec7TL0LnYs5+gP6Ck8YduFJsH7rRMasFPq0cHiCpvA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=TFed7rzN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=E6tnG7Is; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=TFed7rzN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=E6tnG7Is; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="TFed7rzN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="E6tnG7Is"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="TFed7rzN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="E6tnG7Is" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 84332211F8; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D0DRj73yVF7KH3GCPmJnNH+WIAZISmd7AuVsvp30Rn8=; b=TFed7rzNmNi/muSPFC0f3KY3WLTrqWolBw1LJUx4rUVOSrV2kZ2iebDwb5ynxVC4WuiQIL 1A7hQniV2id6+aSIDcwe3cAZ0RJgnV6ZMZ2DqYNXdh32fxuLaNEpl5TgIO2stTOzLhjC8g GYOJb6+ygctMaSof4j8CzcdIsyTfQv0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D0DRj73yVF7KH3GCPmJnNH+WIAZISmd7AuVsvp30Rn8=; b=E6tnG7IsPvMV06FVPndm3mceY6YlWaPqqiww95ZirfdEmnFtYAoi1G6+kTdzIZhFNYrLxB gqhCRMW3MfctOXAw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=TFed7rzN; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=E6tnG7Is DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D0DRj73yVF7KH3GCPmJnNH+WIAZISmd7AuVsvp30Rn8=; b=TFed7rzNmNi/muSPFC0f3KY3WLTrqWolBw1LJUx4rUVOSrV2kZ2iebDwb5ynxVC4WuiQIL 1A7hQniV2id6+aSIDcwe3cAZ0RJgnV6ZMZ2DqYNXdh32fxuLaNEpl5TgIO2stTOzLhjC8g GYOJb6+ygctMaSof4j8CzcdIsyTfQv0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D0DRj73yVF7KH3GCPmJnNH+WIAZISmd7AuVsvp30Rn8=; b=E6tnG7IsPvMV06FVPndm3mceY6YlWaPqqiww95ZirfdEmnFtYAoi1G6+kTdzIZhFNYrLxB gqhCRMW3MfctOXAw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 624B1139D2; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6L6/Fu4Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:06 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 71/89] ASoC: mediatek: mt8192: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:16 +0100 Message-ID: <20250313174139.29942-72-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 84332211F8 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c index 80cda7bf5ccc..fd6af74d7995 100644 --- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c @@ -2313,15 +2313,15 @@ static const struct of_device_id mt8192_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt8192_afe_pcm_dt_match); static const struct dev_pm_ops mt8192_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt8192_afe_runtime_suspend, - mt8192_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt8192_afe_runtime_suspend, + mt8192_afe_runtime_resume, NULL) }; static struct platform_driver mt8192_afe_pcm_driver = { .driver = { .name = "mt8192-audio", .of_match_table = mt8192_afe_pcm_dt_match, - .pm = &mt8192_afe_pm_ops, + .pm = pm_ptr(&mt8192_afe_pm_ops), }, .probe = mt8192_afe_pcm_dev_probe, .remove = mt8192_afe_pcm_dev_remove, From patchwork Thu Mar 13 17:41:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015667 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4A931CD215 for ; Thu, 13 Mar 2025 17:45:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887954; cv=none; b=a4feOo3futyupm0OwQjfhcMvajFwGBUzYscHh3T7koU8JSOBfHfS1ufxJ0KceyjTWk9Rrj1wR5vfNv0eFTTmZaR0FtMgvEe6FHWG8/7uZ2aLluC/GZWe0Lwix+JHnA1gNUPUE9IRndyAqXHVx5NKmezmEnUKekcVQz8uots8Eoo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887954; c=relaxed/simple; bh=vTn3zLlPxVg1Pun1wyDPHlryGpAPKbs6ILbCFEOhNUI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i0xD/6Wq9ZqL9Rsy+mD1k2pSiSBrOIbiLtyTjaZXQVvlASSkCm2w6j7IIfL7V3Mj00FDbajk271unRXTWKOXOwyqrGsdhexC15qJ2EubM2VeVIxgyddq9sVwfhoKBAjFqnILYW73q2erVArxOWl0QJAvfsq5d9wo72ERPhU5w2U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=r5i6F3ia; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4bciTRQ6; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=r5i6F3ia; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4bciTRQ6; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="r5i6F3ia"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4bciTRQ6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="r5i6F3ia"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4bciTRQ6" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A9E41211F9; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ja/+Kzg3R5DydWGyat0nHpsJx5yiPl5rSjlPBbA4EUw=; b=r5i6F3iaSz7EwbH5yqolg7QuGqbpFxjB0A48QZ7VRipawIZlFqPJHHYdH/kefXERXXPF+8 b3/NTYQaVD/CqkbBjd0lxALOYAyVbcK8nBmyCTKYX4spgEYT2izt3yKBZza1uis2vlCHYM Pvbw+xfzNUYq2FxlkQaOPB8wtRdpLzk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ja/+Kzg3R5DydWGyat0nHpsJx5yiPl5rSjlPBbA4EUw=; b=4bciTRQ6bcPgYH5YOsKnGxDJlKrsIT/2h6NkR85NMgwhvZEtxltyS6mJknmuxMFDoCLqQP XLtoG7bhL/vcopAA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ja/+Kzg3R5DydWGyat0nHpsJx5yiPl5rSjlPBbA4EUw=; b=r5i6F3iaSz7EwbH5yqolg7QuGqbpFxjB0A48QZ7VRipawIZlFqPJHHYdH/kefXERXXPF+8 b3/NTYQaVD/CqkbBjd0lxALOYAyVbcK8nBmyCTKYX4spgEYT2izt3yKBZza1uis2vlCHYM Pvbw+xfzNUYq2FxlkQaOPB8wtRdpLzk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ja/+Kzg3R5DydWGyat0nHpsJx5yiPl5rSjlPBbA4EUw=; b=4bciTRQ6bcPgYH5YOsKnGxDJlKrsIT/2h6NkR85NMgwhvZEtxltyS6mJknmuxMFDoCLqQP XLtoG7bhL/vcopAA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8A58A13A24; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4Ct5IO4Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:06 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 72/89] ASoC: mediatek: mt8195: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:17 +0100 Message-ID: <20250313174139.29942-73-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c index 8016bfb35015..5d025ad72263 100644 --- a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c +++ b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c @@ -3188,15 +3188,15 @@ static const struct of_device_id mt8195_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt8195_afe_pcm_dt_match); static const struct dev_pm_ops mt8195_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt8195_afe_runtime_suspend, - mt8195_afe_runtime_resume, NULL) + RUNTIME_PM_OPS(mt8195_afe_runtime_suspend, + mt8195_afe_runtime_resume, NULL) }; static struct platform_driver mt8195_afe_pcm_driver = { .driver = { .name = "mt8195-audio", .of_match_table = mt8195_afe_pcm_dt_match, - .pm = &mt8195_afe_pm_ops, + .pm = pm_ptr(&mt8195_afe_pm_ops), }, .probe = mt8195_afe_pcm_dev_probe, .remove = mt8195_afe_pcm_dev_remove, From patchwork Thu Mar 13 17:41:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015657 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A761F29A9 for ; Thu, 13 Mar 2025 17:45:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887924; cv=none; b=OlvYZt9DyyXTajLY5XA/SuZL16kXBm1xygc/IMIGP89zMwGOIfH5lehOG/lGad/uQ9R1a2NmciMavUYKTBPrMYMNiwRLIUHczysi+ElLdCA3wFjmouMoCWnlBW4vgY5lrKM/ciLx9TJg97tNk+D6E5jASJKPhG0hQj0RtuZLq9w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887924; c=relaxed/simple; bh=8LRporsHito/33pLv3lQATRo8Df/6O4qAq3vo59ubiQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NCE33jOHnq8CmNGCAfuoTP5h/dvtWOmQomQv8dE8oexUuFfl+tRwptA7KafDxPk32MrSNAz176N+nCaqZngAlmS0YCnzYnEV+ZjcFmksMvE2AX3OhMMPEuCKsUBDPXVO75k2Q0TbthtMPqeUwlsKuQP4PkjEFkiw6TZStYfQf1s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=wH6AFqAd; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=BEmyhMHn; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=wH6AFqAd; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=BEmyhMHn; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="wH6AFqAd"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="BEmyhMHn"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="wH6AFqAd"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="BEmyhMHn" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D0F661F790; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5eNFSFjUX/siCv5xJzUGxQ0xFJsH9MpwXfm4dJzoXcQ=; b=wH6AFqAdM2m3+MDKXPta0YAbwu7a9gMxNGKarUNsWSTKZ3wXjfcPiFiEMjSzbOqtS4WK9+ KTFGUfU3IqoryIqnO38SGaS7oHOlVKeI+as7A0wGvZuxwwMUOznsBhiyTyYbWF6vkEWcD9 1N1T3mL95yS31/peElCT3VPOow0Wi30= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5eNFSFjUX/siCv5xJzUGxQ0xFJsH9MpwXfm4dJzoXcQ=; b=BEmyhMHn9uiG4HCfWl/LITwp++x1moKLEkzI2enApb9ZjcUtGC9tUWPUNzxsFqXNmLgJtg K2aavUYckfcy8ECA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5eNFSFjUX/siCv5xJzUGxQ0xFJsH9MpwXfm4dJzoXcQ=; b=wH6AFqAdM2m3+MDKXPta0YAbwu7a9gMxNGKarUNsWSTKZ3wXjfcPiFiEMjSzbOqtS4WK9+ KTFGUfU3IqoryIqnO38SGaS7oHOlVKeI+as7A0wGvZuxwwMUOznsBhiyTyYbWF6vkEWcD9 1N1T3mL95yS31/peElCT3VPOow0Wi30= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887726; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5eNFSFjUX/siCv5xJzUGxQ0xFJsH9MpwXfm4dJzoXcQ=; b=BEmyhMHn9uiG4HCfWl/LITwp++x1moKLEkzI2enApb9ZjcUtGC9tUWPUNzxsFqXNmLgJtg K2aavUYckfcy8ECA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B01FD139D2; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id sJOwKe4Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:06 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 73/89] ASoC: mediatek: mt8365: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:18 +0100 Message-ID: <20250313174139.29942-74-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to drop ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/mediatek/mt8365/mt8365-afe-pcm.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c index 743b46572144..10793bbe9275 100644 --- a/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c +++ b/sound/soc/mediatek/mt8365/mt8365-afe-pcm.c @@ -1957,7 +1957,7 @@ static irqreturn_t mt8365_afe_irq_handler(int irq, void *dev_id) return IRQ_HANDLED; } -static int __maybe_unused mt8365_afe_runtime_suspend(struct device *dev) +static int mt8365_afe_runtime_suspend(struct device *dev) { return 0; } @@ -1967,7 +1967,7 @@ static int mt8365_afe_runtime_resume(struct device *dev) return 0; } -static int __maybe_unused mt8365_afe_suspend(struct device *dev) +static int mt8365_afe_suspend(struct device *dev) { struct mtk_base_afe *afe = dev_get_drvdata(dev); struct regmap *regmap = afe->regmap; @@ -1989,7 +1989,7 @@ static int __maybe_unused mt8365_afe_suspend(struct device *dev) return 0; } -static int __maybe_unused mt8365_afe_resume(struct device *dev) +static int mt8365_afe_resume(struct device *dev) { struct mtk_base_afe *afe = dev_get_drvdata(dev); struct regmap *regmap = afe->regmap; @@ -2009,7 +2009,7 @@ static int __maybe_unused mt8365_afe_resume(struct device *dev) return 0; } -static int __maybe_unused mt8365_afe_dev_runtime_suspend(struct device *dev) +static int mt8365_afe_dev_runtime_suspend(struct device *dev) { struct mtk_base_afe *afe = dev_get_drvdata(dev); @@ -2021,7 +2021,7 @@ static int __maybe_unused mt8365_afe_dev_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused mt8365_afe_dev_runtime_resume(struct device *dev) +static int mt8365_afe_dev_runtime_resume(struct device *dev) { struct mtk_base_afe *afe = dev_get_drvdata(dev); @@ -2250,17 +2250,16 @@ static const struct of_device_id mt8365_afe_pcm_dt_match[] = { MODULE_DEVICE_TABLE(of, mt8365_afe_pcm_dt_match); static const struct dev_pm_ops mt8365_afe_pm_ops = { - SET_RUNTIME_PM_OPS(mt8365_afe_dev_runtime_suspend, - mt8365_afe_dev_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(mt8365_afe_suspend, - mt8365_afe_resume) + RUNTIME_PM_OPS(mt8365_afe_dev_runtime_suspend, + mt8365_afe_dev_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(mt8365_afe_suspend, mt8365_afe_resume) }; static struct platform_driver mt8365_afe_pcm_driver = { .driver = { .name = "mt8365-afe-pcm", .of_match_table = mt8365_afe_pcm_dt_match, - .pm = &mt8365_afe_pm_ops, + .pm = pm_ptr(&mt8365_afe_pm_ops), }, .probe = mt8365_afe_pcm_dev_probe, .remove = mt8365_afe_pcm_dev_remove, From patchwork Thu Mar 13 17:41:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015669 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B82B18C006 for ; Thu, 13 Mar 2025 17:45:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887959; cv=none; b=qfQ+8lOMxSTF8bF9KcxQt16Qthr7vo868EGue6SuIMTc/n7tgh2bki142ka+6wWleV5YBVMTmd0eVZM8eBykfhLP103rctZ2c8eUzKjghS9y8ogt/qLd2ZNEL1Ni6dUPZu6v7fsg1s6w7fyOinx8vGIFMivmbGOViWtAJ+IRLzY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887959; c=relaxed/simple; bh=6b51cI3zloE/Mad0wdGaKdDyQwzaTh5HnqJeIZTnkiw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VPr0U+twlO+y7HL3IFRDlPxChwkpI3lbyZosQAll+/f+FRbKN03xCdM3GFbiSiWeAdMqR71eigDHPQn1DOpjTTYc7SkKATvMSBvrBYEUU2uq4PMKmwU9sXmZfiBxXGEygAVZeI4gHWKerz+9mCEUZ+PUvKc5za6orYBagq8owNM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=KF84lCJF; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=MTcEY++6; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=KF84lCJF; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=MTcEY++6; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="KF84lCJF"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="MTcEY++6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="KF84lCJF"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="MTcEY++6" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1423C211FA; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ya/RAB5RvHjOuNGYHnxoKibkHL73yVzql64uhtGOTmY=; b=KF84lCJF/Qe2bH8PNCyyWhL8Z7CO/jrH8BegfppCyG00QU+IyRPGbUdyIYfnjSaOp/zrVP vW6uH8RKXwER6px61uIny7y2pIs9fpdKBqqTJ3CEIcAnRTG3+jyxJM5/bFBXK0eI87MrtP fmCjQEe7mmR47v5HqydYMA3t8T1pblQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ya/RAB5RvHjOuNGYHnxoKibkHL73yVzql64uhtGOTmY=; b=MTcEY++6uko4s7y+MldBxYLS7+MUOELc3Tjl+FqQPyONr0Mt/EmmdxR2tYl9+J5lZQEQ8M a4GmBE3+yYKlWfBQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=KF84lCJF; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=MTcEY++6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ya/RAB5RvHjOuNGYHnxoKibkHL73yVzql64uhtGOTmY=; b=KF84lCJF/Qe2bH8PNCyyWhL8Z7CO/jrH8BegfppCyG00QU+IyRPGbUdyIYfnjSaOp/zrVP vW6uH8RKXwER6px61uIny7y2pIs9fpdKBqqTJ3CEIcAnRTG3+jyxJM5/bFBXK0eI87MrtP fmCjQEe7mmR47v5HqydYMA3t8T1pblQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ya/RAB5RvHjOuNGYHnxoKibkHL73yVzql64uhtGOTmY=; b=MTcEY++6uko4s7y+MldBxYLS7+MUOELc3Tjl+FqQPyONr0Mt/EmmdxR2tYl9+J5lZQEQ8M a4GmBE3+yYKlWfBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id D768A13A24; Thu, 13 Mar 2025 17:42:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id yENXM+4Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:06 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 74/89] ASoC: qcom: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:41:19 +0100 Message-ID: <20250313174139.29942-75-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 1423C211FA X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to drop ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Srinivas Kandagatla Signed-off-by: Takashi Iwai --- sound/soc/qcom/lpass-sc7180.c | 8 ++++---- sound/soc/qcom/lpass-sc7280.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c index fbead6af3d95..7c6a9b0fda89 100644 --- a/sound/soc/qcom/lpass-sc7180.c +++ b/sound/soc/qcom/lpass-sc7180.c @@ -160,14 +160,14 @@ static int sc7180_lpass_exit(struct platform_device *pdev) return 0; } -static int __maybe_unused sc7180_lpass_dev_resume(struct device *dev) +static int sc7180_lpass_dev_resume(struct device *dev) { struct lpass_data *drvdata = dev_get_drvdata(dev); return clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); } -static int __maybe_unused sc7180_lpass_dev_suspend(struct device *dev) +static int sc7180_lpass_dev_suspend(struct device *dev) { struct lpass_data *drvdata = dev_get_drvdata(dev); @@ -176,7 +176,7 @@ static int __maybe_unused sc7180_lpass_dev_suspend(struct device *dev) } static const struct dev_pm_ops sc7180_lpass_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(sc7180_lpass_dev_suspend, sc7180_lpass_dev_resume) + SYSTEM_SLEEP_PM_OPS(sc7180_lpass_dev_suspend, sc7180_lpass_dev_resume) }; static const struct lpass_variant sc7180_data = { @@ -312,7 +312,7 @@ static struct platform_driver sc7180_lpass_cpu_platform_driver = { .driver = { .name = "sc7180-lpass-cpu", .of_match_table = of_match_ptr(sc7180_lpass_cpu_device_id), - .pm = &sc7180_lpass_pm_ops, + .pm = pm_ptr(&sc7180_lpass_pm_ops), }, .probe = asoc_qcom_lpass_cpu_platform_probe, .remove = asoc_qcom_lpass_cpu_platform_remove, diff --git a/sound/soc/qcom/lpass-sc7280.c b/sound/soc/qcom/lpass-sc7280.c index 7cd3e291382a..817c824f9179 100644 --- a/sound/soc/qcom/lpass-sc7280.c +++ b/sound/soc/qcom/lpass-sc7280.c @@ -233,14 +233,14 @@ static int sc7280_lpass_exit(struct platform_device *pdev) return 0; } -static int __maybe_unused sc7280_lpass_dev_resume(struct device *dev) +static int sc7280_lpass_dev_resume(struct device *dev) { struct lpass_data *drvdata = dev_get_drvdata(dev); return clk_bulk_prepare_enable(drvdata->num_clks, drvdata->clks); } -static int __maybe_unused sc7280_lpass_dev_suspend(struct device *dev) +static int sc7280_lpass_dev_suspend(struct device *dev) { struct lpass_data *drvdata = dev_get_drvdata(dev); @@ -249,7 +249,7 @@ static int __maybe_unused sc7280_lpass_dev_suspend(struct device *dev) } static const struct dev_pm_ops sc7280_lpass_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(sc7280_lpass_dev_suspend, sc7280_lpass_dev_resume) + SYSTEM_SLEEP_PM_OPS(sc7280_lpass_dev_suspend, sc7280_lpass_dev_resume) }; static const struct lpass_variant sc7280_data = { @@ -442,7 +442,7 @@ static struct platform_driver sc7280_lpass_cpu_platform_driver = { .driver = { .name = "sc7280-lpass-cpu", .of_match_table = of_match_ptr(sc7280_lpass_cpu_device_id), - .pm = &sc7280_lpass_pm_ops, + .pm = pm_ptr(&sc7280_lpass_pm_ops), }, .probe = asoc_qcom_lpass_cpu_platform_probe, .remove = asoc_qcom_lpass_cpu_platform_remove, From patchwork Thu Mar 13 17:41:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015660 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0BBA1E51EE for ; Thu, 13 Mar 2025 17:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887930; cv=none; b=hBxninEx+BDVjLqH6NOB9MrMxAsO8T33Gac1p2l2TeVp6sQti7hSf+QBaqM790dgSm5bISdP8z+KAXBqgn6yWOVS6ChH4ISeP4YrT3r3c1YHjNKhqZfKm7xmYQ2RYGFPr8tu1aSNhYZvuUMQC+jGWP0/Ugm2Oz5mHrOZe3n8gdg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887930; c=relaxed/simple; bh=TOTp01n5I2uulikfSBRyOJYJ54C8uH2mMFsqdoysIj8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VMGk+34xlLN4DNMG0yPD24ySGwfG/4/5cyrbjB0a0SLRLM6zXh7kwZTP9GvJsF+/1rG9jizKFfu11QQyYpeNOQf54K1dpJCpF6R1mfypvxIeAl5yByQor2cUmzQ558mHb5PHGhUUre4a0gxterLXZDzgorK6BuzlFlfINGTcw2I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gYhgXid1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Jvj7QA4C; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gYhgXid1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Jvj7QA4C; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gYhgXid1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Jvj7QA4C"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gYhgXid1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Jvj7QA4C" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 45F191F7AB; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5/EOsnv1+f5QfGLkeUdMe0ztpHXBbTZmJoXJ8rtXVE=; b=gYhgXid1S+iZ99Tlo7/VrjOO3sUlHLgz1Q7WacSNO560Ve64bd//vSQVbt8nGMbXJ9l/V1 7ylXoA0hFQUSHF/ABATZFEHChU/hi1Iwau7xCs7vDCOaNY0R/SFw5j/e+iq+tUk01L7J2p INB3mcH39eI5EGOw4fV4YtBC6INzOGk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5/EOsnv1+f5QfGLkeUdMe0ztpHXBbTZmJoXJ8rtXVE=; b=Jvj7QA4Cj8vUJsKN3/w/OBpNuWXHXnD1hfpmoA4IE3+kcNVJowKRZxnqhDcQmaisudpthO D97zkWKXJftCRqBg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5/EOsnv1+f5QfGLkeUdMe0ztpHXBbTZmJoXJ8rtXVE=; b=gYhgXid1S+iZ99Tlo7/VrjOO3sUlHLgz1Q7WacSNO560Ve64bd//vSQVbt8nGMbXJ9l/V1 7ylXoA0hFQUSHF/ABATZFEHChU/hi1Iwau7xCs7vDCOaNY0R/SFw5j/e+iq+tUk01L7J2p INB3mcH39eI5EGOw4fV4YtBC6INzOGk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k5/EOsnv1+f5QfGLkeUdMe0ztpHXBbTZmJoXJ8rtXVE=; b=Jvj7QA4Cj8vUJsKN3/w/OBpNuWXHXnD1hfpmoA4IE3+kcNVJowKRZxnqhDcQmaisudpthO D97zkWKXJftCRqBg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 10735137BA; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id gPm6Au8Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:07 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Kuninori Morimoto Subject: [PATCH 75/89] ASoC: rcar: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:41:20 +0100 Message-ID: <20250313174139.29942-76-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to drop ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Kuninori Morimoto Signed-off-by: Takashi Iwai Acked-by: Kuninori Morimoto --- sound/soc/renesas/rcar/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/renesas/rcar/core.c b/sound/soc/renesas/rcar/core.c index f3f0c3f0bb9f..30afc942d381 100644 --- a/sound/soc/renesas/rcar/core.c +++ b/sound/soc/renesas/rcar/core.c @@ -2059,7 +2059,7 @@ static void rsnd_remove(struct platform_device *pdev) remove_func[i](priv); } -static int __maybe_unused rsnd_suspend(struct device *dev) +static int rsnd_suspend(struct device *dev) { struct rsnd_priv *priv = dev_get_drvdata(dev); @@ -2068,7 +2068,7 @@ static int __maybe_unused rsnd_suspend(struct device *dev) return 0; } -static int __maybe_unused rsnd_resume(struct device *dev) +static int rsnd_resume(struct device *dev) { struct rsnd_priv *priv = dev_get_drvdata(dev); @@ -2076,13 +2076,13 @@ static int __maybe_unused rsnd_resume(struct device *dev) } static const struct dev_pm_ops rsnd_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(rsnd_suspend, rsnd_resume) + SYSTEM_SLEEP_PM_OPS(rsnd_suspend, rsnd_resume) }; static struct platform_driver rsnd_driver = { .driver = { .name = "rcar_sound", - .pm = &rsnd_pm_ops, + .pm = pm_ptr(&rsnd_pm_ops), .of_match_table = rsnd_of_match, }, .probe = rsnd_probe, From patchwork Thu Mar 13 17:41:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015662 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9D908635C for ; Thu, 13 Mar 2025 17:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887936; cv=none; b=DNeQ7O1a4O6vTyHDqtL8Ei/SyLV3LrJDFQymvjN9QwPLvT7Tb156rikAiiJnxkkd16evg4OpivQbsxZtAEhkIMLmbWaqIAicXPi5s9aW1hNqMHSTsxPUeHmFkYPoaNWnivV5ffmSxGoHiropKJYUlBAsAFX7+Xbwz2jGoZMzO60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887936; c=relaxed/simple; bh=sADiLTkrhb7eXJx+ghNoxpIKl0jHe2UADQMig9vu8Vg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WQoHIjpbvqkXTi+U2lIAJHuyW5EuL1e2R9BMBU6d6AkH5G7iqaPIzPOQXqLXRK8pZBUfiSeYmduttGBv4AppCHEQWHcGqwCThdIEkWOnMmeVrugUbhOMauCT1jLZPErDiR6kvFtNwTqjVPoOOPSld9AubY2OZgmOObRQcE4VvSI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=c7SZBsUg; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=qe9gDAjG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=c7SZBsUg; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=qe9gDAjG; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="c7SZBsUg"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="qe9gDAjG"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="c7SZBsUg"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="qe9gDAjG" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6FF2A1F7AF; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQCKIAqZeT5QqrQgVZScnFrqjV29sIPW5wxAnYhnAPE=; b=c7SZBsUgVZbflMStqsxvMgrOh0L+p9LHOCBpsN2iK8VM7pX7GYz5V4DKQk7AdmFg4DpZiV qC03rSjmftanLB04AMmZXGtTRIg1Ihi0ggGnaiRMBandnHgarqV4f02FucTEPqZaPIRH9V Maiq3eHz3N59N4ZF9NR5ODZypf5pmeg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQCKIAqZeT5QqrQgVZScnFrqjV29sIPW5wxAnYhnAPE=; b=qe9gDAjGwEFSDEwJDbTMEp5LWC1PEUNG+7tRwS4K6052BLj2U2cwYjLj3dhN8tX+ewzqyw NpCN0RIlB9pM70AA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=c7SZBsUg; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=qe9gDAjG DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQCKIAqZeT5QqrQgVZScnFrqjV29sIPW5wxAnYhnAPE=; b=c7SZBsUgVZbflMStqsxvMgrOh0L+p9LHOCBpsN2iK8VM7pX7GYz5V4DKQk7AdmFg4DpZiV qC03rSjmftanLB04AMmZXGtTRIg1Ihi0ggGnaiRMBandnHgarqV4f02FucTEPqZaPIRH9V Maiq3eHz3N59N4ZF9NR5ODZypf5pmeg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQCKIAqZeT5QqrQgVZScnFrqjV29sIPW5wxAnYhnAPE=; b=qe9gDAjGwEFSDEwJDbTMEp5LWC1PEUNG+7tRwS4K6052BLj2U2cwYjLj3dhN8tX+ewzqyw NpCN0RIlB9pM70AA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 42FEE139D2; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qCYYD+8Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:07 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 76/89] ASoC: rockchip: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:21 +0100 Message-ID: <20250313174139.29942-77-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 6FF2A1F7AF X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to drop ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/rockchip/rockchip_i2s.c | 5 ++--- sound/soc/rockchip/rockchip_i2s_tdm.c | 16 +++++++--------- sound/soc/rockchip/rockchip_pdm.c | 10 ++++------ sound/soc/rockchip/rockchip_spdif.c | 9 ++++----- 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 4315da4a47c1..0a0a95b4f520 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -860,8 +860,7 @@ static void rockchip_i2s_remove(struct platform_device *pdev) } static const struct dev_pm_ops rockchip_i2s_pm_ops = { - SET_RUNTIME_PM_OPS(i2s_runtime_suspend, i2s_runtime_resume, - NULL) + RUNTIME_PM_OPS(i2s_runtime_suspend, i2s_runtime_resume, NULL) }; static struct platform_driver rockchip_i2s_driver = { @@ -870,7 +869,7 @@ static struct platform_driver rockchip_i2s_driver = { .driver = { .name = DRV_NAME, .of_match_table = of_match_ptr(rockchip_i2s_match), - .pm = &rockchip_i2s_pm_ops, + .pm = pm_ptr(&rockchip_i2s_pm_ops), }, }; module_platform_driver(rockchip_i2s_driver); diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c index 78ab88843f86..d9a1fab7f403 100644 --- a/sound/soc/rockchip/rockchip_i2s_tdm.c +++ b/sound/soc/rockchip/rockchip_i2s_tdm.c @@ -122,7 +122,7 @@ static int i2s_tdm_prepare_enable_mclk(struct rk_i2s_tdm_dev *i2s_tdm) return ret; } -static int __maybe_unused i2s_tdm_runtime_suspend(struct device *dev) +static int i2s_tdm_runtime_suspend(struct device *dev) { struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); @@ -134,7 +134,7 @@ static int __maybe_unused i2s_tdm_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused i2s_tdm_runtime_resume(struct device *dev) +static int i2s_tdm_runtime_resume(struct device *dev) { struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); int ret; @@ -1390,7 +1390,7 @@ static void rockchip_i2s_tdm_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused rockchip_i2s_tdm_suspend(struct device *dev) +static int rockchip_i2s_tdm_suspend(struct device *dev) { struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); @@ -1399,7 +1399,7 @@ static int __maybe_unused rockchip_i2s_tdm_suspend(struct device *dev) return 0; } -static int __maybe_unused rockchip_i2s_tdm_resume(struct device *dev) +static int rockchip_i2s_tdm_resume(struct device *dev) { struct rk_i2s_tdm_dev *i2s_tdm = dev_get_drvdata(dev); int ret; @@ -1414,10 +1414,8 @@ static int __maybe_unused rockchip_i2s_tdm_resume(struct device *dev) } static const struct dev_pm_ops rockchip_i2s_tdm_pm_ops = { - SET_RUNTIME_PM_OPS(i2s_tdm_runtime_suspend, i2s_tdm_runtime_resume, - NULL) - SET_SYSTEM_SLEEP_PM_OPS(rockchip_i2s_tdm_suspend, - rockchip_i2s_tdm_resume) + RUNTIME_PM_OPS(i2s_tdm_runtime_suspend, i2s_tdm_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rockchip_i2s_tdm_suspend, rockchip_i2s_tdm_resume) }; static struct platform_driver rockchip_i2s_tdm_driver = { @@ -1426,7 +1424,7 @@ static struct platform_driver rockchip_i2s_tdm_driver = { .driver = { .name = DRV_NAME, .of_match_table = rockchip_i2s_tdm_match, - .pm = &rockchip_i2s_tdm_pm_ops, + .pm = pm_ptr(&rockchip_i2s_tdm_pm_ops), }, }; module_platform_driver(rockchip_i2s_tdm_driver); diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index cae91108f7a8..c1ee470ec607 100644 --- a/sound/soc/rockchip/rockchip_pdm.c +++ b/sound/soc/rockchip/rockchip_pdm.c @@ -668,7 +668,6 @@ static void rockchip_pdm_remove(struct platform_device *pdev) clk_disable_unprepare(pdm->hclk); } -#ifdef CONFIG_PM_SLEEP static int rockchip_pdm_suspend(struct device *dev) { struct rk_pdm_dev *pdm = dev_get_drvdata(dev); @@ -693,12 +692,11 @@ static int rockchip_pdm_resume(struct device *dev) return ret; } -#endif static const struct dev_pm_ops rockchip_pdm_pm_ops = { - SET_RUNTIME_PM_OPS(rockchip_pdm_runtime_suspend, - rockchip_pdm_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(rockchip_pdm_suspend, rockchip_pdm_resume) + RUNTIME_PM_OPS(rockchip_pdm_runtime_suspend, + rockchip_pdm_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(rockchip_pdm_suspend, rockchip_pdm_resume) }; static struct platform_driver rockchip_pdm_driver = { @@ -707,7 +705,7 @@ static struct platform_driver rockchip_pdm_driver = { .driver = { .name = "rockchip-pdm", .of_match_table = of_match_ptr(rockchip_pdm_match), - .pm = &rockchip_pdm_pm_ops, + .pm = pm_ptr(&rockchip_pdm_pm_ops), }, }; diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index d87c0e4f6f91..d365168934dc 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c @@ -63,7 +63,7 @@ static const struct of_device_id rk_spdif_match[] __maybe_unused = { }; MODULE_DEVICE_TABLE(of, rk_spdif_match); -static int __maybe_unused rk_spdif_runtime_suspend(struct device *dev) +static int rk_spdif_runtime_suspend(struct device *dev) { struct rk_spdif_dev *spdif = dev_get_drvdata(dev); @@ -74,7 +74,7 @@ static int __maybe_unused rk_spdif_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused rk_spdif_runtime_resume(struct device *dev) +static int rk_spdif_runtime_resume(struct device *dev) { struct rk_spdif_dev *spdif = dev_get_drvdata(dev); int ret; @@ -374,8 +374,7 @@ static void rk_spdif_remove(struct platform_device *pdev) } static const struct dev_pm_ops rk_spdif_pm_ops = { - SET_RUNTIME_PM_OPS(rk_spdif_runtime_suspend, rk_spdif_runtime_resume, - NULL) + RUNTIME_PM_OPS(rk_spdif_runtime_suspend, rk_spdif_runtime_resume, NULL) }; static struct platform_driver rk_spdif_driver = { @@ -384,7 +383,7 @@ static struct platform_driver rk_spdif_driver = { .driver = { .name = "rockchip-spdif", .of_match_table = of_match_ptr(rk_spdif_match), - .pm = &rk_spdif_pm_ops, + .pm = pm_ptr(&rk_spdif_pm_ops), }, }; module_platform_driver(rk_spdif_driver); From patchwork Thu Mar 13 17:41:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015664 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 630791D63E4 for ; Thu, 13 Mar 2025 17:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887941; cv=none; b=ZIioksuufJ/qttpnNx8R5rZz4Mz+WMTPgPjHOOev/IyFQti9/z8laRpcMLixFv97UOGRM3Ge/uIwQatq3VftXEIjyPMxY9ZscIOm/qdwNYknjR54AypmLaAIfCOReuVNDeB2S0T5280uM1HoTjzRySTFkkK48UIb/+4X0edfQc4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887941; c=relaxed/simple; bh=bJY+BZgfA88QEsuUCKd26MJc2UYEN3lM8+nh5pkAscg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y4KauESxUQ/Y/qRR7TecipPAYhEXsvckaZjldH01SHC3OxJ3BhdcE/cFxEgbSKY7EDPsMUB9znjMrW132wVP6L/13ODlZFA84Tt5u4lG2eYtqW4WnvlF7IYPcnI2yZHARrXtXVCYKoVJ+X5AfaniOcKi8PtLb8bAbqluFdjKE4w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=oG17dyVK; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=vuR4RT/5; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=oG17dyVK; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=vuR4RT/5; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="oG17dyVK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="vuR4RT/5"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="oG17dyVK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="vuR4RT/5" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 904531F7B1; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YT2wAINHSOaIqEStkry1dChBhTUOydaRH0wA8jeOv0s=; b=oG17dyVK9sQtC2ZFV/gzVdVe9khQXyVCFxpYyI3N9vssU3xfdQUKKPnBS+cgmSo5MBqajC npv98qqcrHJKYJ9Y9iRzWa/rcpRClENmRuWP6+S+0WQe8umw2kA+Wam7A+hucMwYd1CfRC QwmL22hj0K6foGUo1PJSxAQjbr92B7I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YT2wAINHSOaIqEStkry1dChBhTUOydaRH0wA8jeOv0s=; b=vuR4RT/5Fgo2STXkxTTIQ4BSNrDAY/HGLoGgLBYjOwXB6OY7rNEA1vNjGEUjs3QKW5tuKC EriWUSWMFKudT0CQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YT2wAINHSOaIqEStkry1dChBhTUOydaRH0wA8jeOv0s=; b=oG17dyVK9sQtC2ZFV/gzVdVe9khQXyVCFxpYyI3N9vssU3xfdQUKKPnBS+cgmSo5MBqajC npv98qqcrHJKYJ9Y9iRzWa/rcpRClENmRuWP6+S+0WQe8umw2kA+Wam7A+hucMwYd1CfRC QwmL22hj0K6foGUo1PJSxAQjbr92B7I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YT2wAINHSOaIqEStkry1dChBhTUOydaRH0wA8jeOv0s=; b=vuR4RT/5Fgo2STXkxTTIQ4BSNrDAY/HGLoGgLBYjOwXB6OY7rNEA1vNjGEUjs3QKW5tuKC EriWUSWMFKudT0CQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6BD1613A24; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id aNsMGe8Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:07 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH 77/89] ASoC: samsung: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:22 +0100 Message-ID: <20250313174139.29942-78-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to drop superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Sylwester Nawrocki Signed-off-by: Takashi Iwai --- sound/soc/samsung/i2s.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 8f6deb06e234..e9964f0e010a 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1216,7 +1216,6 @@ static int i2s_alloc_dais(struct samsung_i2s_priv *priv, return 0; } -#ifdef CONFIG_PM static int i2s_runtime_suspend(struct device *dev) { struct samsung_i2s_priv *priv = dev_get_drvdata(dev); @@ -1254,7 +1253,6 @@ static int i2s_runtime_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM */ static void i2s_unregister_clocks(struct samsung_i2s_priv *priv) { @@ -1733,10 +1731,8 @@ MODULE_DEVICE_TABLE(of, exynos_i2s_match); #endif static const struct dev_pm_ops samsung_i2s_pm = { - SET_RUNTIME_PM_OPS(i2s_runtime_suspend, - i2s_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(i2s_runtime_suspend, i2s_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver samsung_i2s_driver = { @@ -1746,7 +1742,7 @@ static struct platform_driver samsung_i2s_driver = { .driver = { .name = "samsung-i2s", .of_match_table = of_match_ptr(exynos_i2s_match), - .pm = &samsung_i2s_pm, + .pm = pm_ptr(&samsung_i2s_pm), }, }; From patchwork Thu Mar 13 17:41:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015671 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D3A918D65F for ; Thu, 13 Mar 2025 17:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887966; cv=none; b=lP8NpHXd6ZWOwvdtfdjSx15662U29WnFtCX5ihb+BlMQRW+DuZlWEchzXkKSW0ryBDZehc0uOL1Za4mmA81+veT39Dzg05nAgk/jgbIaH37i1fF7npDSOBRXWyCjnGWdPAhAF8qfSqXqrke/IFwId1tGFrZLXwUzCFl3BlvDZbQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887966; c=relaxed/simple; bh=HyzmEeEh1ys6+SDpv387Ql3zEPEQ7MbpDh9ZxbXmwkc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OACSw0/9pTHpuT5spuc9Xb6EIAo8j1Tt7XLm8x7JcdTw7ICrDDORJYi3Ipw1E5sj55sZeAD3YdObl1RYQAmDHr03f7vWqXTdugTzryz2TTBShjxF8FAdutSqaPbHx7lJ9kDytofxgRCL9YbQTK2+7s+ctgyVGSX7WyDL53R1LxA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=bDjtabfE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HIVuCwlo; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=bDjtabfE; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HIVuCwlo; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="bDjtabfE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HIVuCwlo"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="bDjtabfE"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HIVuCwlo" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BDDB2211F3; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8YYCvBfzJuMCdKs+b5AcoCMaHoZY/XwQCOHPxmc3uNg=; b=bDjtabfErwUIVgD78cOt5u0Z8Pz9HC1Mk4BnsEQneFycVe5lGKHMTdhjhRJgIiuAotK+af PZWyyst1Z/G7h7yk9uuMcEuySQ+yPkJ3uxeDo+thSqfe0VrDKOG2kaDrnEfjeON0XWIrbB evDT53q1JFMQYk9wUqZAle9oB4+HLw8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8YYCvBfzJuMCdKs+b5AcoCMaHoZY/XwQCOHPxmc3uNg=; b=HIVuCwlodrnRm4nzNxXb1odhDCGao3C4LVlNs8tzxmRvM8EBYB3Uqx+lIh6IJsTgsWH4dE cZWLiCOf5bQePbDg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=bDjtabfE; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=HIVuCwlo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8YYCvBfzJuMCdKs+b5AcoCMaHoZY/XwQCOHPxmc3uNg=; b=bDjtabfErwUIVgD78cOt5u0Z8Pz9HC1Mk4BnsEQneFycVe5lGKHMTdhjhRJgIiuAotK+af PZWyyst1Z/G7h7yk9uuMcEuySQ+yPkJ3uxeDo+thSqfe0VrDKOG2kaDrnEfjeON0XWIrbB evDT53q1JFMQYk9wUqZAle9oB4+HLw8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8YYCvBfzJuMCdKs+b5AcoCMaHoZY/XwQCOHPxmc3uNg=; b=HIVuCwlodrnRm4nzNxXb1odhDCGao3C4LVlNs8tzxmRvM8EBYB3Uqx+lIh6IJsTgsWH4dE cZWLiCOf5bQePbDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 97683137BA; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qDGtI+8Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:07 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, sound-open-firmware@alsa-project.org Subject: [PATCH 78/89] ASoC: SOF: acpi: Convert to EXPORT_NS_DEV_PM_OPS() Date: Thu, 13 Mar 2025 18:41:23 +0100 Message-ID: <20250313174139.29942-79-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: BDDB2211F3 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer EXPORT_NS_DEV_PM_OPS() macro together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Cc: sound-open-firmware@alsa-project.org Signed-off-by: Takashi Iwai --- sound/soc/sof/intel/bdw.c | 2 +- sound/soc/sof/intel/byt.c | 2 +- sound/soc/sof/sof-acpi-dev.c | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c index 79374dcde89f..f1287d509835 100644 --- a/sound/soc/sof/intel/bdw.c +++ b/sound/soc/sof/intel/bdw.c @@ -686,7 +686,7 @@ static struct platform_driver snd_sof_acpi_intel_bdw_driver = { .remove = sof_acpi_remove, .driver = { .name = "sof-audio-acpi-intel-bdw", - .pm = &sof_acpi_pm, + .pm = pm_ptr(&sof_acpi_pm), .acpi_match_table = sof_broadwell_match, }, }; diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c index 900cc10a3b7f..18208f77b84d 100644 --- a/sound/soc/sof/intel/byt.c +++ b/sound/soc/sof/intel/byt.c @@ -467,7 +467,7 @@ static struct platform_driver snd_sof_acpi_intel_byt_driver = { .remove = sof_acpi_remove, .driver = { .name = "sof-audio-acpi-intel-byt", - .pm = &sof_acpi_pm, + .pm = pm_ptr(&sof_acpi_pm), .acpi_match_table = sof_baytrail_match, }, }; diff --git a/sound/soc/sof/sof-acpi-dev.c b/sound/soc/sof/sof-acpi-dev.c index 58fd5f7c7905..cd5bcd2e1475 100644 --- a/sound/soc/sof/sof-acpi-dev.c +++ b/sound/soc/sof/sof-acpi-dev.c @@ -36,12 +36,11 @@ MODULE_PARM_DESC(sof_acpi_debug, "SOF ACPI debug options (0x0 all off)"); #define SOF_ACPI_DISABLE_PM_RUNTIME BIT(0) -const struct dev_pm_ops sof_acpi_pm = { - SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) - SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, - snd_sof_runtime_idle) +EXPORT_NS_DEV_PM_OPS(sof_acpi_pm, "SND_SOC_SOF_ACPI_DEV") = { + SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) + RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, + snd_sof_runtime_idle) }; -EXPORT_SYMBOL_NS(sof_acpi_pm, "SND_SOC_SOF_ACPI_DEV"); static void sof_acpi_probe_complete(struct device *dev) { From patchwork Thu Mar 13 17:41:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015666 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFAD018D65F for ; Thu, 13 Mar 2025 17:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887948; cv=none; b=LQOqaHyrulpjg4BA4atqLlVDAx5IRxZua3fk+YoJ1FErkpdJNzG932yQEX6wzf7DeveAwaNADLdBrOwoxmk9y0gSPSj1If08qx9RGJY7gXHWFRRxitqIyv6XLf/uiCyWx/TMHMf5lY0+xMKJzga5+v58neaGiJz3ruDFy1u7fVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887948; c=relaxed/simple; bh=LE8rlRXX2XEMpTR2y/ESGDcXgYwbUP06X2nB6/RAxYY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AjXJfYk3HgQ9pKujLOGYgRjdiLiXo9xS5rvcSwnYUzWaKVfw5AefwNDt3FwaNbgf6hS5iWFV9MJJ2sfORFBpzb/FLkZXyH5ssm8h7jJs57qC6ilF0r6CKlrEAl9LQcxXqJW0cTk+iIfNpDNyu95EQyPaJTaWv0MTZpkLFT3cEjU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=x+asJ1Lc; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4qOyiY5w; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=KAC2VMAD; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=RhPd69kh; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="x+asJ1Lc"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4qOyiY5w"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="KAC2VMAD"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="RhPd69kh" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EBD661F7B2; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3PosViUxg1MdzRV9AjysS+ezMvD/5E8Wsxq84yl/270=; b=x+asJ1LcpUhinbQG9eCJG6Au1SceTrWXXs8qeMHE/o5Ba9hvcr+yuTWKbpteib2HQPW8Py YlDuWxVBF3HmmoqOtnr+Ng6v3JqKX/GgbWgptyQQO4Dm4TTsFMVigmuCbMQ4TZX37opzfJ bG770/YLQZDkCrtEeQ14VrPzwcmjVg0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3PosViUxg1MdzRV9AjysS+ezMvD/5E8Wsxq84yl/270=; b=4qOyiY5wGg8GfmX0YBDKje+pXBK35ryZwRMmqVuv76fTWvNZlk1fwxF0Li8jrwKHpdOKP7 X0hE5S6Hcyvn2NDQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3PosViUxg1MdzRV9AjysS+ezMvD/5E8Wsxq84yl/270=; b=KAC2VMADvXVNifoiTCnFF9/x6Yi+BXdIZ7lf6lAcj9UuF4CacEz7sYkNTyUjeIT/f3rzCw vLxwCtvVsBsDq/HZ3Ez0GOfdLXSvpiq8i9mREBm0pdyuWFzTiSy86dgKzASIgiZCN9yrgC B2rQ65rMhIYB8NkZS+zr4/XAEjGJCIw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887727; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3PosViUxg1MdzRV9AjysS+ezMvD/5E8Wsxq84yl/270=; b=RhPd69khoQwnZ7GVmoQM19uc9jljs7jTTnO30r7x2HiOt99gvMZyI+71cnkokiDFr27p6Z NOnPx5sjLCmVv1Cg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C4980139D2; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4KG4Lu8Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:07 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, sound-open-firmware@alsa-project.org Subject: [PATCH 79/89] ASoC: SOF: pci: Convert to EXPORT_NS_DEV_PM_OPS() Date: Thu, 13 Mar 2025 18:41:24 +0100 Message-ID: <20250313174139.29942-80-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer EXPORT_NS_DEV_PM_OPS() macro together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Cc: sound-open-firmware@alsa-project.org Signed-off-by: Takashi Iwai --- sound/soc/sof/amd/pci-acp63.c | 2 +- sound/soc/sof/amd/pci-acp70.c | 2 +- sound/soc/sof/amd/pci-rn.c | 2 +- sound/soc/sof/amd/pci-vangogh.c | 2 +- sound/soc/sof/intel/pci-apl.c | 2 +- sound/soc/sof/intel/pci-cnl.c | 2 +- sound/soc/sof/intel/pci-icl.c | 2 +- sound/soc/sof/intel/pci-lnl.c | 2 +- sound/soc/sof/intel/pci-mtl.c | 2 +- sound/soc/sof/intel/pci-ptl.c | 2 +- sound/soc/sof/intel/pci-skl.c | 2 +- sound/soc/sof/intel/pci-tgl.c | 2 +- sound/soc/sof/intel/pci-tng.c | 2 +- sound/soc/sof/sof-pci-dev.c | 9 ++++----- 14 files changed, 17 insertions(+), 18 deletions(-) diff --git a/sound/soc/sof/amd/pci-acp63.c b/sound/soc/sof/amd/pci-acp63.c index 13aa87cdeeac..21ffdfdcf03d 100644 --- a/sound/soc/sof/amd/pci-acp63.c +++ b/sound/soc/sof/amd/pci-acp63.c @@ -104,7 +104,7 @@ static struct pci_driver snd_sof_pci_amd_acp63_driver = { .probe = acp63_pci_probe, .remove = acp63_pci_remove, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_amd_acp63_driver); diff --git a/sound/soc/sof/amd/pci-acp70.c b/sound/soc/sof/amd/pci-acp70.c index d886bdf3a112..8fa1170a2161 100644 --- a/sound/soc/sof/amd/pci-acp70.c +++ b/sound/soc/sof/amd/pci-acp70.c @@ -100,7 +100,7 @@ static struct pci_driver snd_sof_pci_amd_acp70_driver = { .probe = acp70_pci_probe, .remove = acp70_pci_remove, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_amd_acp70_driver); diff --git a/sound/soc/sof/amd/pci-rn.c b/sound/soc/sof/amd/pci-rn.c index 4a36029a00de..2b7fbcf11b55 100644 --- a/sound/soc/sof/amd/pci-rn.c +++ b/sound/soc/sof/amd/pci-rn.c @@ -97,7 +97,7 @@ static struct pci_driver snd_sof_pci_amd_rn_driver = { .probe = acp_pci_rn_probe, .remove = acp_pci_rn_remove, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_amd_rn_driver); diff --git a/sound/soc/sof/amd/pci-vangogh.c b/sound/soc/sof/amd/pci-vangogh.c index caf9e2b2e463..6ef692becfb9 100644 --- a/sound/soc/sof/amd/pci-vangogh.c +++ b/sound/soc/sof/amd/pci-vangogh.c @@ -90,7 +90,7 @@ static struct pci_driver snd_sof_pci_amd_vgh_driver = { .probe = acp_pci_vgh_probe, .remove = acp_pci_vgh_remove, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_amd_vgh_driver); diff --git a/sound/soc/sof/intel/pci-apl.c b/sound/soc/sof/intel/pci-apl.c index 94ab3c61e3f7..0bf7ee753bc3 100644 --- a/sound/soc/sof/intel/pci-apl.c +++ b/sound/soc/sof/intel/pci-apl.c @@ -99,7 +99,7 @@ static struct pci_driver snd_sof_pci_intel_apl_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_apl_driver); diff --git a/sound/soc/sof/intel/pci-cnl.c b/sound/soc/sof/intel/pci-cnl.c index 739c352c3860..de48640024e4 100644 --- a/sound/soc/sof/intel/pci-cnl.c +++ b/sound/soc/sof/intel/pci-cnl.c @@ -137,7 +137,7 @@ static struct pci_driver snd_sof_pci_intel_cnl_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_cnl_driver); diff --git a/sound/soc/sof/intel/pci-icl.c b/sound/soc/sof/intel/pci-icl.c index 8545ab95eac8..fd219e654844 100644 --- a/sound/soc/sof/intel/pci-icl.c +++ b/sound/soc/sof/intel/pci-icl.c @@ -102,7 +102,7 @@ static struct pci_driver snd_sof_pci_intel_icl_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_icl_driver); diff --git a/sound/soc/sof/intel/pci-lnl.c b/sound/soc/sof/intel/pci-lnl.c index 91b9cff8c4ca..ae379c23f008 100644 --- a/sound/soc/sof/intel/pci-lnl.c +++ b/sound/soc/sof/intel/pci-lnl.c @@ -72,7 +72,7 @@ static struct pci_driver snd_sof_pci_intel_lnl_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_lnl_driver); diff --git a/sound/soc/sof/intel/pci-mtl.c b/sound/soc/sof/intel/pci-mtl.c index c5048a4a56be..7b2533999195 100644 --- a/sound/soc/sof/intel/pci-mtl.c +++ b/sound/soc/sof/intel/pci-mtl.c @@ -135,7 +135,7 @@ static struct pci_driver snd_sof_pci_intel_mtl_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_mtl_driver); diff --git a/sound/soc/sof/intel/pci-ptl.c b/sound/soc/sof/intel/pci-ptl.c index 3812ab6d99c0..7d4c46f56931 100644 --- a/sound/soc/sof/intel/pci-ptl.c +++ b/sound/soc/sof/intel/pci-ptl.c @@ -71,7 +71,7 @@ static struct pci_driver snd_sof_pci_intel_ptl_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_ptl_driver); diff --git a/sound/soc/sof/intel/pci-skl.c b/sound/soc/sof/intel/pci-skl.c index bd9daae51e4c..a16945dc35f7 100644 --- a/sound/soc/sof/intel/pci-skl.c +++ b/sound/soc/sof/intel/pci-skl.c @@ -83,7 +83,7 @@ static struct pci_driver snd_sof_pci_intel_skl_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_skl_driver); diff --git a/sound/soc/sof/intel/pci-tgl.c b/sound/soc/sof/intel/pci-tgl.c index f76a7197f6ca..437c43819825 100644 --- a/sound/soc/sof/intel/pci-tgl.c +++ b/sound/soc/sof/intel/pci-tgl.c @@ -311,7 +311,7 @@ static struct pci_driver snd_sof_pci_intel_tgl_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_tgl_driver); diff --git a/sound/soc/sof/intel/pci-tng.c b/sound/soc/sof/intel/pci-tng.c index 3eb7400942dd..0c11cc1fd820 100644 --- a/sound/soc/sof/intel/pci-tng.c +++ b/sound/soc/sof/intel/pci-tng.c @@ -238,7 +238,7 @@ static struct pci_driver snd_sof_pci_intel_tng_driver = { .remove = sof_pci_remove, .shutdown = sof_pci_shutdown, .driver = { - .pm = &sof_pci_pm, + .pm = pm_ptr(&sof_pci_pm), }, }; module_pci_driver(snd_sof_pci_intel_tng_driver); diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 103377e2caaf..8ae1562ab4ef 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -155,14 +155,13 @@ static const struct dmi_system_id community_key_platforms[] = { {}, }; -const struct dev_pm_ops sof_pci_pm = { +EXPORT_NS_DEV_PM_OPS(sof_pci_pm, "SND_SOC_SOF_PCI_DEV") = { .prepare = snd_sof_prepare, .complete = snd_sof_complete, - SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) - SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, - snd_sof_runtime_idle) + SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) + RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, + snd_sof_runtime_idle) }; -EXPORT_SYMBOL_NS(sof_pci_pm, "SND_SOC_SOF_PCI_DEV"); static void sof_pci_probe_complete(struct device *dev) { From patchwork Thu Mar 13 17:41:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015673 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98CE31D5CD4 for ; Thu, 13 Mar 2025 17:46:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887973; cv=none; b=B4buIEK8YXNjDskgAyEjnJhn7tZc2odwKxkQ+pwCVU9YIWJuAbIJzYnnA1oMEo5cDyYe/tf3ThxCn9JXOW4VJK0usIf4UED+rPZ9tBUYP9K7IVMtitRbiq3bxhWgBLs9+MWd3aiy8x/TVc2MLsrO40fg8C1NC6dp/l8HwiOIGEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887973; c=relaxed/simple; bh=xCb44f2zci3LauGxIYd8Nz5uLPees6xZZNVXTQNFhLU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=evGFqSYKTBMjQk3FO2Vfm51QNaEUGShXOm2c7zfFvprKrGneMDs2mYIcCzoFca3oGojEHRFikIP4OiNMKUDEByd3JewW1so//vY6rP9t4uvdcXal95yEmiyy73hRWoFhhgvIvHI2OOD4PmZeY26Ews9OkaNJVIubGA00MraBFdo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=QEfHoqvJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=wLsWKIFm; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=QEfHoqvJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=wLsWKIFm; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="QEfHoqvJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="wLsWKIFm"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="QEfHoqvJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="wLsWKIFm" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 274E92119A; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=01CFKrFgC+WmSZuXQTnhxIIdMOsQmM9q/70U6DJUWnA=; b=QEfHoqvJbNjBGc0ihKAziXlwTDwmHhVO0n65hSlbJM+exmmzaGee/JoCiLf4tp7sOWU0gC +OhfKNubOlSKfrWmbLQxYYKmFFXHhwuD9+W4zvz5blG3059hL8xoHIjEwBI5DTQTX6iSOv hRgrxTTu2MJ0QT0+hBPUFFYUggqh7pU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=01CFKrFgC+WmSZuXQTnhxIIdMOsQmM9q/70U6DJUWnA=; b=wLsWKIFmKfRsqWoYanPDZXVocva5xXuxss5wbklAdX8FjVwoN6vc35VxRGj3cbK0Mtk9B8 SUhysL0l4ql5ZuCA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=QEfHoqvJ; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=wLsWKIFm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=01CFKrFgC+WmSZuXQTnhxIIdMOsQmM9q/70U6DJUWnA=; b=QEfHoqvJbNjBGc0ihKAziXlwTDwmHhVO0n65hSlbJM+exmmzaGee/JoCiLf4tp7sOWU0gC +OhfKNubOlSKfrWmbLQxYYKmFFXHhwuD9+W4zvz5blG3059hL8xoHIjEwBI5DTQTX6iSOv hRgrxTTu2MJ0QT0+hBPUFFYUggqh7pU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=01CFKrFgC+WmSZuXQTnhxIIdMOsQmM9q/70U6DJUWnA=; b=wLsWKIFmKfRsqWoYanPDZXVocva5xXuxss5wbklAdX8FjVwoN6vc35VxRGj3cbK0Mtk9B8 SUhysL0l4ql5ZuCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id F2B5013A24; Thu, 13 Mar 2025 17:42:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qDgNOu8Y02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:07 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, sound-open-firmware@alsa-project.org Subject: [PATCH 80/89] ASoC: SOF: of: Convert to EXPORT_NS_DEV_PM_OPS() Date: Thu, 13 Mar 2025 18:41:25 +0100 Message-ID: <20250313174139.29942-81-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 274E92119A X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer EXPORT_NS_DEV_PM_OPS() macro together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Cc: sound-open-firmware@alsa-project.org Signed-off-by: Takashi Iwai --- sound/soc/sof/imx/imx8.c | 2 +- sound/soc/sof/imx/imx9.c | 2 +- sound/soc/sof/mediatek/mt8186/mt8186.c | 2 +- sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +- sound/soc/sof/sof-of-dev.c | 8 +++----- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index 4be4c569b583..ab07512e511d 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -456,7 +456,7 @@ static struct platform_driver snd_sof_of_imx8_driver = { .remove = sof_of_remove, .driver = { .name = "sof-audio-of-imx8", - .pm = &sof_of_pm, + .pm = pm_ptr(&sof_of_pm), .of_match_table = sof_of_imx8_ids, }, }; diff --git a/sound/soc/sof/imx/imx9.c b/sound/soc/sof/imx/imx9.c index 598675d4350a..853155d5990a 100644 --- a/sound/soc/sof/imx/imx9.c +++ b/sound/soc/sof/imx/imx9.c @@ -126,7 +126,7 @@ static struct platform_driver snd_sof_of_imx9_driver = { .remove = sof_of_remove, .driver = { .name = "sof-audio-of-imx9", - .pm = &sof_of_pm, + .pm = pm_ptr(&sof_of_pm), .of_match_table = sof_of_imx9_ids, }, }; diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c index 31437fdd4e92..18144d9504e1 100644 --- a/sound/soc/sof/mediatek/mt8186/mt8186.c +++ b/sound/soc/sof/mediatek/mt8186/mt8186.c @@ -660,7 +660,7 @@ static struct platform_driver snd_sof_of_mt8186_driver = { .shutdown = sof_of_shutdown, .driver = { .name = "sof-audio-of-mt8186", - .pm = &sof_of_pm, + .pm = pm_ptr(&sof_of_pm), .of_match_table = sof_of_mt8186_ids, }, }; diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c index 371563d7ce79..821f43a3974a 100644 --- a/sound/soc/sof/mediatek/mt8195/mt8195.c +++ b/sound/soc/sof/mediatek/mt8195/mt8195.c @@ -616,7 +616,7 @@ static struct platform_driver snd_sof_of_mt8195_driver = { .shutdown = sof_of_shutdown, .driver = { .name = "sof-audio-of-mt8195", - .pm = &sof_of_pm, + .pm = pm_ptr(&sof_of_pm), .of_match_table = sof_of_mt8195_ids, }, }; diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c index fb8c8a14d885..3ccfcfb142b7 100644 --- a/sound/soc/sof/sof-of-dev.c +++ b/sound/soc/sof/sof-of-dev.c @@ -30,14 +30,12 @@ static char *tplg_filename; module_param(tplg_filename, charp, 0444); MODULE_PARM_DESC(tplg_filename, "deprecated - moved to snd-sof module."); -const struct dev_pm_ops sof_of_pm = { +EXPORT_DEV_PM_OPS(sof_of_pm) = { .prepare = snd_sof_prepare, .complete = snd_sof_complete, - SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) - SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, - NULL) + SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) + RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, NULL) }; -EXPORT_SYMBOL(sof_of_pm); static void sof_of_probe_complete(struct device *dev) { From patchwork Thu Mar 13 17:41:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015682 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FFDE1DC985 for ; Thu, 13 Mar 2025 17:46:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887985; cv=none; b=A+jipLA0GF2j+0KrJKl+n2Ur6aQONM8xfhh7DcUfCU3P3SPugTbq9w9q3HHKzEqEHAzCNYI8Vmj9uUokfxHoIJ12WaaCry+OPzbR5N15IYesEWJHYkDgE+sadXDPU/rO8H/0cz/GoMcPH7T9XU1QsRTdg1wycZSTLZtOpclPsQE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887985; c=relaxed/simple; bh=pZOjmLSBzB7EoLXhHLmw6ya6S8XESJYqFBoQzUdfsxU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fzlqceSoaSkOR2IECbvLDuretvVPY0D8qRG9RDVL9r0sWkZUJZ7vW64rYDzrXSq7zFIEzHvC4iLwQguykSc3Etfag40LL4iB7pLW5kucgEqyJdpB2HMvwg8I49zDY1x7DsGzA3bMR0+IVZja0dcGa+jDovJqGscEke9TOkA4wAY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UHG84aGe; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=KVBrzZ7J; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UHG84aGe; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=KVBrzZ7J; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UHG84aGe"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="KVBrzZ7J"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UHG84aGe"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="KVBrzZ7J" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 67522211FB; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ALkCxGMbkVojMnOLD8HonACgqmh+ydB2r6PVOSKY24g=; b=UHG84aGeEXYQCDd2bVWcl8KGF5gVsHsGOV3FWKb34V+KFifuF0hhCClZ0zrCgMGeduHFy7 I9fYvsGCLw5TyyWqemrVvs8RnBqIgRposQKyFA4UELVcOCPOi19zDCgvrnuBWEL5uMEWse 7irNVAEbqGA190UaHrdY7AappyFQQJM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ALkCxGMbkVojMnOLD8HonACgqmh+ydB2r6PVOSKY24g=; b=KVBrzZ7JDl4dNrTfuGsHPDal7PknK7rRu9p7UP2ZrFQm0sca4q2vpG/B2UUWjbmGVS4XJO u1TKEiknQc4yO/AQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=UHG84aGe; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=KVBrzZ7J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ALkCxGMbkVojMnOLD8HonACgqmh+ydB2r6PVOSKY24g=; b=UHG84aGeEXYQCDd2bVWcl8KGF5gVsHsGOV3FWKb34V+KFifuF0hhCClZ0zrCgMGeduHFy7 I9fYvsGCLw5TyyWqemrVvs8RnBqIgRposQKyFA4UELVcOCPOi19zDCgvrnuBWEL5uMEWse 7irNVAEbqGA190UaHrdY7AappyFQQJM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ALkCxGMbkVojMnOLD8HonACgqmh+ydB2r6PVOSKY24g=; b=KVBrzZ7JDl4dNrTfuGsHPDal7PknK7rRu9p7UP2ZrFQm0sca4q2vpG/B2UUWjbmGVS4XJO u1TKEiknQc4yO/AQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2E3B8137BA; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id cMf6CfAY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:08 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Olivier Moysan , Arnaud Pouliquen Subject: [PATCH 81/89] ASoC: stm: Convert to SYSTEM_SLEEP_PM_OPS() Date: Thu, 13 Mar 2025 18:41:26 +0100 Message-ID: <20250313174139.29942-82-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 67522211FB X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,st.com:email]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer SYSTEM_SLEEP_PM_OPS() macro instead SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping superfluous CONFIG_PM_SLEEP ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Olivier Moysan Cc: Arnaud Pouliquen Signed-off-by: Takashi Iwai --- sound/soc/stm/stm32_i2s.c | 6 ++---- sound/soc/stm/stm32_sai.c | 6 ++---- sound/soc/stm/stm32_sai_sub.c | 6 ++---- sound/soc/stm/stm32_spdifrx.c | 6 ++---- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c index 19dc61008a75..6037b7a9c97b 100644 --- a/sound/soc/stm/stm32_i2s.c +++ b/sound/soc/stm/stm32_i2s.c @@ -1352,7 +1352,6 @@ static int stm32_i2s_probe(struct platform_device *pdev) MODULE_DEVICE_TABLE(of, stm32_i2s_ids); -#ifdef CONFIG_PM_SLEEP static int stm32_i2s_suspend(struct device *dev) { struct stm32_i2s_data *i2s = dev_get_drvdata(dev); @@ -1370,17 +1369,16 @@ static int stm32_i2s_resume(struct device *dev) regcache_cache_only(i2s->regmap, false); return regcache_sync(i2s->regmap); } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops stm32_i2s_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(stm32_i2s_suspend, stm32_i2s_resume) + SYSTEM_SLEEP_PM_OPS(stm32_i2s_suspend, stm32_i2s_resume) }; static struct platform_driver stm32_i2s_driver = { .driver = { .name = "st,stm32-i2s", .of_match_table = stm32_i2s_ids, - .pm = &stm32_i2s_pm_ops, + .pm = pm_ptr(&stm32_i2s_pm_ops), }, .probe = stm32_i2s_probe, .remove = stm32_i2s_remove, diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c index bc8180fc8462..504a14584765 100644 --- a/sound/soc/stm/stm32_sai.c +++ b/sound/soc/stm/stm32_sai.c @@ -270,7 +270,6 @@ static int stm32_sai_probe(struct platform_device *pdev) return devm_of_platform_populate(&pdev->dev); } -#ifdef CONFIG_PM_SLEEP /* * When pins are shared by two sai sub instances, pins have to be defined * in sai parent node. In this case, pins state is not managed by alsa fw. @@ -305,10 +304,9 @@ static int stm32_sai_resume(struct device *dev) return pinctrl_pm_select_default_state(dev); } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops stm32_sai_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(stm32_sai_suspend, stm32_sai_resume) + SYSTEM_SLEEP_PM_OPS(stm32_sai_suspend, stm32_sai_resume) }; MODULE_DEVICE_TABLE(of, stm32_sai_ids); @@ -317,7 +315,7 @@ static struct platform_driver stm32_sai_driver = { .driver = { .name = "st,stm32-sai", .of_match_table = stm32_sai_ids, - .pm = &stm32_sai_pm_ops, + .pm = pm_ptr(&stm32_sai_pm_ops), }, .probe = stm32_sai_probe, }; diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c index 3efbf4aaf965..e8c1abf1ae0a 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -1704,7 +1704,6 @@ static void stm32_sai_sub_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -#ifdef CONFIG_PM_SLEEP static int stm32_sai_sub_suspend(struct device *dev) { struct stm32_sai_sub_data *sai = dev_get_drvdata(dev); @@ -1738,17 +1737,16 @@ static int stm32_sai_sub_resume(struct device *dev) return ret; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops stm32_sai_sub_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(stm32_sai_sub_suspend, stm32_sai_sub_resume) + SYSTEM_SLEEP_PM_OPS(stm32_sai_sub_suspend, stm32_sai_sub_resume) }; static struct platform_driver stm32_sai_sub_driver = { .driver = { .name = "st,stm32-sai-sub", .of_match_table = stm32_sai_sub_ids, - .pm = &stm32_sai_sub_pm_ops, + .pm = pm_ptr(&stm32_sai_sub_pm_ops), }, .probe = stm32_sai_sub_probe, .remove = stm32_sai_sub_remove, diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c index 9e30852de93c..57b711c44278 100644 --- a/sound/soc/stm/stm32_spdifrx.c +++ b/sound/soc/stm/stm32_spdifrx.c @@ -1040,7 +1040,6 @@ static int stm32_spdifrx_probe(struct platform_device *pdev) MODULE_DEVICE_TABLE(of, stm32_spdifrx_ids); -#ifdef CONFIG_PM_SLEEP static int stm32_spdifrx_suspend(struct device *dev) { struct stm32_spdifrx_data *spdifrx = dev_get_drvdata(dev); @@ -1059,17 +1058,16 @@ static int stm32_spdifrx_resume(struct device *dev) return regcache_sync(spdifrx->regmap); } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops stm32_spdifrx_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(stm32_spdifrx_suspend, stm32_spdifrx_resume) + SYSTEM_SLEEP_PM_OPS(stm32_spdifrx_suspend, stm32_spdifrx_resume) }; static struct platform_driver stm32_spdifrx_driver = { .driver = { .name = "st,stm32-spdifrx", .of_match_table = stm32_spdifrx_ids, - .pm = &stm32_spdifrx_pm_ops, + .pm = pm_ptr(&stm32_spdifrx_pm_ops), }, .probe = stm32_spdifrx_probe, .remove = stm32_spdifrx_remove, From patchwork Thu Mar 13 17:41:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015675 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F159D1DC985 for ; Thu, 13 Mar 2025 17:46:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887979; cv=none; b=Ixfy/kcVxUMwkRLghx2rgysfdMXmts2WwpFnkjkjfRPsVTmWGUFS3f14pQMZ7yCfoi07HevlCrlOKKIhPmZ4ipZDFvy6tRO7JjFjwnwfqwatKyLa5fCXnOdoPR3TahxjIQtNOwIe2/4lZTlJhaYrNcf58FuaXqtPfXwYd0668DI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887979; c=relaxed/simple; bh=14C6wShO9M44owh0o60E1hVQxaB8S5CPzWbRqvQc62Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nG96pqYx81uwqQs6I5dVQfa7Pf9YsHeNV+PUOinP6eUewZDchpJpDz7PMIWhRP8WTQ3FWvb2e7za+8fvfWqYasBVbWID57touljDj/iAbm9K+KKNnKfCPPOeqkQ0RxMSgFHxHFBcu8sWAg+6LDGBJjazqR7/9zLUvv1isksOiLI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=h4o04zCz; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2iMBJGB2; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=h4o04zCz; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2iMBJGB2; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="h4o04zCz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2iMBJGB2"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="h4o04zCz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2iMBJGB2" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 82E79211FC; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0eIKP/AW5utm/JaodAKRHMP4Y6bghTMaIa/+l3f45Q0=; b=h4o04zCzmge+xk2THPbFsvXVCX5YkGdp7SY1OJNGyrS0ATqIqBblTS+N2hSmZaRmJEzgmT OrA0ghdtdmJfZ14M61xfQRK+XKzEOAgwO9uB0UF6TH94EayXb6JZIJjb1P6WppMb89o8MR Ci4ZxgTWIDqHBpTM6HHqeP9GhOfBvbw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0eIKP/AW5utm/JaodAKRHMP4Y6bghTMaIa/+l3f45Q0=; b=2iMBJGB2GCMZxX+d1xosW4ELEaqcbamjnEipjzeAwj1BvWjLWP7RrJjzziR6i3NcpCk7di 4W0+ya/9R28hXqAg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0eIKP/AW5utm/JaodAKRHMP4Y6bghTMaIa/+l3f45Q0=; b=h4o04zCzmge+xk2THPbFsvXVCX5YkGdp7SY1OJNGyrS0ATqIqBblTS+N2hSmZaRmJEzgmT OrA0ghdtdmJfZ14M61xfQRK+XKzEOAgwO9uB0UF6TH94EayXb6JZIJjb1P6WppMb89o8MR Ci4ZxgTWIDqHBpTM6HHqeP9GhOfBvbw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0eIKP/AW5utm/JaodAKRHMP4Y6bghTMaIa/+l3f45Q0=; b=2iMBJGB2GCMZxX+d1xosW4ELEaqcbamjnEipjzeAwj1BvWjLWP7RrJjzziR6i3NcpCk7di 4W0+ya/9R28hXqAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 62CC5139D2; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id sOrVFvAY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:08 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 82/89] ASoC: sunxi: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:27 +0100 Message-ID: <20250313174139.29942-83-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/sunxi/sun4i-spdif.c | 6 +++--- sound/soc/sunxi/sun50i-dmic.c | 6 +++--- sound/soc/sunxi/sun8i-codec.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c index 41caf1795d09..34e5bd94e9af 100644 --- a/sound/soc/sunxi/sun4i-spdif.c +++ b/sound/soc/sunxi/sun4i-spdif.c @@ -727,15 +727,15 @@ static void sun4i_spdif_remove(struct platform_device *pdev) } static const struct dev_pm_ops sun4i_spdif_pm = { - SET_RUNTIME_PM_OPS(sun4i_spdif_runtime_suspend, - sun4i_spdif_runtime_resume, NULL) + RUNTIME_PM_OPS(sun4i_spdif_runtime_suspend, + sun4i_spdif_runtime_resume, NULL) }; static struct platform_driver sun4i_spdif_driver = { .driver = { .name = "sun4i-spdif", .of_match_table = sun4i_spdif_of_match, - .pm = &sun4i_spdif_pm, + .pm = pm_ptr(&sun4i_spdif_pm), }, .probe = sun4i_spdif_probe, .remove = sun4i_spdif_remove, diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c index 3e751b5694fe..bab1e29c9988 100644 --- a/sound/soc/sunxi/sun50i-dmic.c +++ b/sound/soc/sunxi/sun50i-dmic.c @@ -415,15 +415,15 @@ static void sun50i_dmic_remove(struct platform_device *pdev) } static const struct dev_pm_ops sun50i_dmic_pm = { - SET_RUNTIME_PM_OPS(sun50i_dmic_runtime_suspend, - sun50i_dmic_runtime_resume, NULL) + RUNTIME_PM_OPS(sun50i_dmic_runtime_suspend, + sun50i_dmic_runtime_resume, NULL) }; static struct platform_driver sun50i_dmic_driver = { .driver = { .name = "sun50i-dmic", .of_match_table = sun50i_dmic_of_match, - .pm = &sun50i_dmic_pm, + .pm = pm_ptr(&sun50i_dmic_pm), }, .probe = sun50i_dmic_probe, .remove = sun50i_dmic_remove, diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index 8c645e04d571..8b9eb1a202f7 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -1702,15 +1702,15 @@ static const struct of_device_id sun8i_codec_of_match[] = { MODULE_DEVICE_TABLE(of, sun8i_codec_of_match); static const struct dev_pm_ops sun8i_codec_pm_ops = { - SET_RUNTIME_PM_OPS(sun8i_codec_runtime_suspend, - sun8i_codec_runtime_resume, NULL) + RUNTIME_PM_OPS(sun8i_codec_runtime_suspend, + sun8i_codec_runtime_resume, NULL) }; static struct platform_driver sun8i_codec_driver = { .driver = { .name = "sun8i-codec", .of_match_table = sun8i_codec_of_match, - .pm = &sun8i_codec_pm_ops, + .pm = pm_ptr(&sun8i_codec_pm_ops), }, .probe = sun8i_codec_probe, .remove = sun8i_codec_remove, From patchwork Thu Mar 13 17:41:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015668 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6FF718C006 for ; Thu, 13 Mar 2025 17:45:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887955; cv=none; b=cT5MS5zJqzOZaMrHrXWszNAVyefRWhMATW41w4OAl43dJDJ9elxdtLdM+chOTDjHS1mBsx9Xh6sFOzETiRQJTQDQwt2a7fCWat7pWViJlgdA1AaJs3rZ3MnvBGzud7bKK27M8YWtJnaCmfdQ1jIm47jss9qch/MHcGwFny2t+n0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887955; c=relaxed/simple; bh=RsA9j94p+YVvKdB90cd3Q/61+ZX91AldYwaYz9pEC0o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pmSXN++siTVtNzH+43Tbt2MVLNuuu3mqRv0tnEJMuXCndIOa8+zAw2HohwYZNNvdP5ZpKds65UrFrgA42RzpRqDSKU54ekmEgLDJbg7jcgzlrOSiHNcXY5ipzI+wQi7izCLKImd4qrPJML3zDgGM148G3TPnBE9N83FmfJgmLU8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ykQTyMem; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=549nby3B; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ykQTyMem; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=549nby3B; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ykQTyMem"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="549nby3B"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ykQTyMem"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="549nby3B" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B13611F7B4; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CFKEjjkIm78Ad6srk/hCg61amYwn0Z51tJngkFiWp6I=; b=ykQTyMemgcDeUgX3A1DRVqRAcDbTN1CFSySAqMMOPcHtUZX0SNSR22wfzUj5p9kMxcMCw7 ibNpQ7U+gxZHsk8CjbB+UwaozPXqDZXqlh1HLp8mAW4EFtR0+X0Nh6dS0UHqnc+MpZxepm LzcWgqAeMpN/R9WQpYXdL6EN1/1E2BE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CFKEjjkIm78Ad6srk/hCg61amYwn0Z51tJngkFiWp6I=; b=549nby3BsSdxF4qgTF03aqvKCUWfK6YYKyV+fmMoM/hscJjKMtYEpkmQJGplyZgWXW2J2v B8GJULBPBeY9gOCA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ykQTyMem; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=549nby3B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CFKEjjkIm78Ad6srk/hCg61amYwn0Z51tJngkFiWp6I=; b=ykQTyMemgcDeUgX3A1DRVqRAcDbTN1CFSySAqMMOPcHtUZX0SNSR22wfzUj5p9kMxcMCw7 ibNpQ7U+gxZHsk8CjbB+UwaozPXqDZXqlh1HLp8mAW4EFtR0+X0Nh6dS0UHqnc+MpZxepm LzcWgqAeMpN/R9WQpYXdL6EN1/1E2BE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CFKEjjkIm78Ad6srk/hCg61amYwn0Z51tJngkFiWp6I=; b=549nby3BsSdxF4qgTF03aqvKCUWfK6YYKyV+fmMoM/hscJjKMtYEpkmQJGplyZgWXW2J2v B8GJULBPBeY9gOCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8A9C113A24; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EBpRIPAY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:08 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 83/89] ASoC: tegra186: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:28 +0100 Message-ID: <20250313174139.29942-84-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: B13611F7B4 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: linux-tegra@vger.kernel.org Signed-off-by: Takashi Iwai --- sound/soc/tegra/tegra186_asrc.c | 13 ++++++------- sound/soc/tegra/tegra186_dspk.c | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sound/soc/tegra/tegra186_asrc.c b/sound/soc/tegra/tegra186_asrc.c index d914dba56013..5c67e1f01d9b 100644 --- a/sound/soc/tegra/tegra186_asrc.c +++ b/sound/soc/tegra/tegra186_asrc.c @@ -76,7 +76,7 @@ static void tegra186_asrc_lock_stream(struct tegra186_asrc *asrc, 1); } -static int __maybe_unused tegra186_asrc_runtime_suspend(struct device *dev) +static int tegra186_asrc_runtime_suspend(struct device *dev) { struct tegra186_asrc *asrc = dev_get_drvdata(dev); @@ -86,7 +86,7 @@ static int __maybe_unused tegra186_asrc_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra186_asrc_runtime_resume(struct device *dev) +static int tegra186_asrc_runtime_resume(struct device *dev) { struct tegra186_asrc *asrc = dev_get_drvdata(dev); int id; @@ -1021,17 +1021,16 @@ static void tegra186_asrc_platform_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra186_asrc_pm_ops = { - SET_RUNTIME_PM_OPS(tegra186_asrc_runtime_suspend, - tegra186_asrc_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra186_asrc_runtime_suspend, + tegra186_asrc_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra186_asrc_driver = { .driver = { .name = "tegra186-asrc", .of_match_table = tegra186_asrc_of_match, - .pm = &tegra186_asrc_pm_ops, + .pm = pm_ptr(&tegra186_asrc_pm_ops), }, .probe = tegra186_asrc_platform_probe, .remove = tegra186_asrc_platform_remove, diff --git a/sound/soc/tegra/tegra186_dspk.c b/sound/soc/tegra/tegra186_dspk.c index 1be6c09cbe1a..21fdab2a1977 100644 --- a/sound/soc/tegra/tegra186_dspk.c +++ b/sound/soc/tegra/tegra186_dspk.c @@ -181,7 +181,7 @@ static int tegra186_dspk_put_stereo_to_mono(struct snd_kcontrol *kcontrol, return 1; } -static int __maybe_unused tegra186_dspk_runtime_suspend(struct device *dev) +static int tegra186_dspk_runtime_suspend(struct device *dev) { struct tegra186_dspk *dspk = dev_get_drvdata(dev); @@ -193,7 +193,7 @@ static int __maybe_unused tegra186_dspk_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra186_dspk_runtime_resume(struct device *dev) +static int tegra186_dspk_runtime_resume(struct device *dev) { struct tegra186_dspk *dspk = dev_get_drvdata(dev); int err; @@ -532,17 +532,16 @@ static void tegra186_dspk_platform_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra186_dspk_pm_ops = { - SET_RUNTIME_PM_OPS(tegra186_dspk_runtime_suspend, - tegra186_dspk_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra186_dspk_runtime_suspend, + tegra186_dspk_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra186_dspk_driver = { .driver = { .name = "tegra186-dspk", .of_match_table = tegra186_dspk_of_match, - .pm = &tegra186_dspk_pm_ops, + .pm = pm_ptr(&tegra186_dspk_pm_ops), }, .probe = tegra186_dspk_platform_probe, .remove = tegra186_dspk_platform_remove, From patchwork Thu Mar 13 17:41:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015670 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0AD518D65F for ; Thu, 13 Mar 2025 17:45:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887961; cv=none; b=VJZbED2B8AFmgm4XWQaZWSIOsZZoUyYlLgz3dYgTN1jd4rDrfYbWQNoP8pP4xwxVUbzKYNN9lr/swafbQQO30mAcxmPuDIOg7bDl/Mzt2ZO3D3P+uwzEV+8Q0Chcdq1o/kcdkCtNFXuqIIuSOQkS16qgfdOSyzvXBtMPDxZNUWQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887961; c=relaxed/simple; bh=iIvbVzMcFcwDv56juXKSPMxS+wYnIL+MESafUX06zGE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DeMWQlKglf8FoiSxdqwVNfQm4ec7XaXrSFHMaLs9mSwZdtTozD8pjVU3qRXxEN3EKK+2tVhWtcHcQiTpZtkUBhm/fIc8YtvVpos8S7VlrDRPAB2N9ecQFug1Q7i2R5TU9/cvAx3DRO+vwEBmYDhv9hVeqN8zTdx5uIXnlPtIgug= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=hOZKRNeP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=keaLKqTP; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=hOZKRNeP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=keaLKqTP; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="hOZKRNeP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="keaLKqTP"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="hOZKRNeP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="keaLKqTP" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DD1A31F7B5; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BTU1WzqZhhuIljaNNNNzSyShixVU996Re2We29m17Ok=; b=hOZKRNePI4s3HzHtMDQC4gqsv79hnYB6H2NllSD7eNVTY+wVeV2yZiH4OcjHy05LfN2dkF xJae4nrFvirmEEILmup7SVO6EQt26tDWPxoCX1FH9wd3iZZtHX2H2aOdGA9Aqf0lldMOja ZVUwjPrYmFyrcNYrbAdZW2R4tqy9MQw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BTU1WzqZhhuIljaNNNNzSyShixVU996Re2We29m17Ok=; b=keaLKqTPJVKtcA+6WbSIf+sf/r4F/+bY73AkonqktPU5GuxueyK8B/yENHpdVmGYtTEUXI QhmPtgup8w2f16CQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BTU1WzqZhhuIljaNNNNzSyShixVU996Re2We29m17Ok=; b=hOZKRNePI4s3HzHtMDQC4gqsv79hnYB6H2NllSD7eNVTY+wVeV2yZiH4OcjHy05LfN2dkF xJae4nrFvirmEEILmup7SVO6EQt26tDWPxoCX1FH9wd3iZZtHX2H2aOdGA9Aqf0lldMOja ZVUwjPrYmFyrcNYrbAdZW2R4tqy9MQw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887728; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BTU1WzqZhhuIljaNNNNzSyShixVU996Re2We29m17Ok=; b=keaLKqTPJVKtcA+6WbSIf+sf/r4F/+bY73AkonqktPU5GuxueyK8B/yENHpdVmGYtTEUXI QhmPtgup8w2f16CQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B7DD4137BA; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id UAipK/AY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:08 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 84/89] ASoC: tegra210: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:29 +0100 Message-ID: <20250313174139.29942-85-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: linux-tegra@vger.kernel.org Signed-off-by: Takashi Iwai --- sound/soc/tegra/tegra210_admaif.c | 13 ++++++------- sound/soc/tegra/tegra210_adx.c | 13 ++++++------- sound/soc/tegra/tegra210_ahub.c | 13 ++++++------- sound/soc/tegra/tegra210_amx.c | 13 ++++++------- sound/soc/tegra/tegra210_dmic.c | 13 ++++++------- sound/soc/tegra/tegra210_i2s.c | 13 ++++++------- sound/soc/tegra/tegra210_mixer.c | 13 ++++++------- sound/soc/tegra/tegra210_mvc.c | 13 ++++++------- sound/soc/tegra/tegra210_ope.c | 13 ++++++------- sound/soc/tegra/tegra210_sfc.c | 13 ++++++------- 10 files changed, 60 insertions(+), 70 deletions(-) diff --git a/sound/soc/tegra/tegra210_admaif.c b/sound/soc/tegra/tegra210_admaif.c index f56d1e03239d..76ff4fe40f65 100644 --- a/sound/soc/tegra/tegra210_admaif.c +++ b/sound/soc/tegra/tegra210_admaif.c @@ -220,7 +220,7 @@ static const struct regmap_config tegra186_admaif_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static int __maybe_unused tegra_admaif_runtime_suspend(struct device *dev) +static int tegra_admaif_runtime_suspend(struct device *dev) { struct tegra_admaif *admaif = dev_get_drvdata(dev); @@ -230,7 +230,7 @@ static int __maybe_unused tegra_admaif_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra_admaif_runtime_resume(struct device *dev) +static int tegra_admaif_runtime_resume(struct device *dev) { struct tegra_admaif *admaif = dev_get_drvdata(dev); @@ -877,10 +877,9 @@ static void tegra_admaif_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra_admaif_pm_ops = { - SET_RUNTIME_PM_OPS(tegra_admaif_runtime_suspend, - tegra_admaif_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra_admaif_runtime_suspend, + tegra_admaif_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra_admaif_driver = { @@ -889,7 +888,7 @@ static struct platform_driver tegra_admaif_driver = { .driver = { .name = "tegra210-admaif", .of_match_table = tegra_admaif_of_match, - .pm = &tegra_admaif_pm_ops, + .pm = pm_ptr(&tegra_admaif_pm_ops), }, }; module_platform_driver(tegra_admaif_driver); diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c index 0aa93b948378..ff34682ebb15 100644 --- a/sound/soc/tegra/tegra210_adx.c +++ b/sound/soc/tegra/tegra210_adx.c @@ -84,7 +84,7 @@ static int tegra210_adx_startup(struct snd_pcm_substream *substream, return 0; } -static int __maybe_unused tegra210_adx_runtime_suspend(struct device *dev) +static int tegra210_adx_runtime_suspend(struct device *dev) { struct tegra210_adx *adx = dev_get_drvdata(dev); @@ -94,7 +94,7 @@ static int __maybe_unused tegra210_adx_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra210_adx_runtime_resume(struct device *dev) +static int tegra210_adx_runtime_resume(struct device *dev) { struct tegra210_adx *adx = dev_get_drvdata(dev); @@ -524,17 +524,16 @@ static void tegra210_adx_platform_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra210_adx_pm_ops = { - SET_RUNTIME_PM_OPS(tegra210_adx_runtime_suspend, - tegra210_adx_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra210_adx_runtime_suspend, + tegra210_adx_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra210_adx_driver = { .driver = { .name = "tegra210-adx", .of_match_table = tegra210_adx_of_match, - .pm = &tegra210_adx_pm_ops, + .pm = pm_ptr(&tegra210_adx_pm_ops), }, .probe = tegra210_adx_platform_probe, .remove = tegra210_adx_platform_remove, diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c index 1920b996e9aa..99683f292b5d 100644 --- a/sound/soc/tegra/tegra210_ahub.c +++ b/sound/soc/tegra/tegra210_ahub.c @@ -1319,7 +1319,7 @@ static const struct of_device_id tegra_ahub_of_match[] = { }; MODULE_DEVICE_TABLE(of, tegra_ahub_of_match); -static int __maybe_unused tegra_ahub_runtime_suspend(struct device *dev) +static int tegra_ahub_runtime_suspend(struct device *dev) { struct tegra_ahub *ahub = dev_get_drvdata(dev); @@ -1331,7 +1331,7 @@ static int __maybe_unused tegra_ahub_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra_ahub_runtime_resume(struct device *dev) +static int tegra_ahub_runtime_resume(struct device *dev) { struct tegra_ahub *ahub = dev_get_drvdata(dev); int err; @@ -1408,10 +1408,9 @@ static void tegra_ahub_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra_ahub_pm_ops = { - SET_RUNTIME_PM_OPS(tegra_ahub_runtime_suspend, - tegra_ahub_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra_ahub_runtime_suspend, + tegra_ahub_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra_ahub_driver = { @@ -1420,7 +1419,7 @@ static struct platform_driver tegra_ahub_driver = { .driver = { .name = "tegra210-ahub", .of_match_table = tegra_ahub_of_match, - .pm = &tegra_ahub_pm_ops, + .pm = pm_ptr(&tegra_ahub_pm_ops), }, }; module_platform_driver(tegra_ahub_driver); diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c index a9ef22c19e81..1981b94009cf 100644 --- a/sound/soc/tegra/tegra210_amx.c +++ b/sound/soc/tegra/tegra210_amx.c @@ -98,7 +98,7 @@ static int tegra210_amx_startup(struct snd_pcm_substream *substream, return 0; } -static int __maybe_unused tegra210_amx_runtime_suspend(struct device *dev) +static int tegra210_amx_runtime_suspend(struct device *dev) { struct tegra210_amx *amx = dev_get_drvdata(dev); @@ -108,7 +108,7 @@ static int __maybe_unused tegra210_amx_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra210_amx_runtime_resume(struct device *dev) +static int tegra210_amx_runtime_resume(struct device *dev) { struct tegra210_amx *amx = dev_get_drvdata(dev); @@ -581,17 +581,16 @@ static void tegra210_amx_platform_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra210_amx_pm_ops = { - SET_RUNTIME_PM_OPS(tegra210_amx_runtime_suspend, - tegra210_amx_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra210_amx_runtime_suspend, + tegra210_amx_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra210_amx_driver = { .driver = { .name = "tegra210-amx", .of_match_table = tegra210_amx_of_match, - .pm = &tegra210_amx_pm_ops, + .pm = pm_ptr(&tegra210_amx_pm_ops), }, .probe = tegra210_amx_platform_probe, .remove = tegra210_amx_platform_remove, diff --git a/sound/soc/tegra/tegra210_dmic.c b/sound/soc/tegra/tegra210_dmic.c index 7986be71f43d..e4a144571265 100644 --- a/sound/soc/tegra/tegra210_dmic.c +++ b/sound/soc/tegra/tegra210_dmic.c @@ -40,7 +40,7 @@ static const struct reg_default tegra210_dmic_reg_defaults[] = { { TEGRA210_DMIC_LP_BIQUAD_1_COEF_4, 0x0 }, }; -static int __maybe_unused tegra210_dmic_runtime_suspend(struct device *dev) +static int tegra210_dmic_runtime_suspend(struct device *dev) { struct tegra210_dmic *dmic = dev_get_drvdata(dev); @@ -52,7 +52,7 @@ static int __maybe_unused tegra210_dmic_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra210_dmic_runtime_resume(struct device *dev) +static int tegra210_dmic_runtime_resume(struct device *dev) { struct tegra210_dmic *dmic = dev_get_drvdata(dev); int err; @@ -543,10 +543,9 @@ static void tegra210_dmic_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra210_dmic_pm_ops = { - SET_RUNTIME_PM_OPS(tegra210_dmic_runtime_suspend, - tegra210_dmic_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra210_dmic_runtime_suspend, + tegra210_dmic_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static const struct of_device_id tegra210_dmic_of_match[] = { @@ -559,7 +558,7 @@ static struct platform_driver tegra210_dmic_driver = { .driver = { .name = "tegra210-dmic", .of_match_table = tegra210_dmic_of_match, - .pm = &tegra210_dmic_pm_ops, + .pm = pm_ptr(&tegra210_dmic_pm_ops), }, .probe = tegra210_dmic_probe, .remove = tegra210_dmic_remove, diff --git a/sound/soc/tegra/tegra210_i2s.c b/sound/soc/tegra/tegra210_i2s.c index 07ce2dbe6c00..766cddebd5f6 100644 --- a/sound/soc/tegra/tegra210_i2s.c +++ b/sound/soc/tegra/tegra210_i2s.c @@ -166,7 +166,7 @@ static int tegra210_i2s_init(struct snd_soc_dapm_widget *w, return tegra210_i2s_sw_reset(compnt, stream); } -static int __maybe_unused tegra210_i2s_runtime_suspend(struct device *dev) +static int tegra210_i2s_runtime_suspend(struct device *dev) { struct tegra210_i2s *i2s = dev_get_drvdata(dev); @@ -178,7 +178,7 @@ static int __maybe_unused tegra210_i2s_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra210_i2s_runtime_resume(struct device *dev) +static int tegra210_i2s_runtime_resume(struct device *dev) { struct tegra210_i2s *i2s = dev_get_drvdata(dev); int err; @@ -1010,10 +1010,9 @@ static void tegra210_i2s_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra210_i2s_pm_ops = { - SET_RUNTIME_PM_OPS(tegra210_i2s_runtime_suspend, - tegra210_i2s_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra210_i2s_runtime_suspend, + tegra210_i2s_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static const struct of_device_id tegra210_i2s_of_match[] = { @@ -1026,7 +1025,7 @@ static struct platform_driver tegra210_i2s_driver = { .driver = { .name = "tegra210-i2s", .of_match_table = tegra210_i2s_of_match, - .pm = &tegra210_i2s_pm_ops, + .pm = pm_ptr(&tegra210_i2s_pm_ops), }, .probe = tegra210_i2s_probe, .remove = tegra210_i2s_remove, diff --git a/sound/soc/tegra/tegra210_mixer.c b/sound/soc/tegra/tegra210_mixer.c index 410259d98dfb..95d69a7e027f 100644 --- a/sound/soc/tegra/tegra210_mixer.c +++ b/sound/soc/tegra/tegra210_mixer.c @@ -73,7 +73,7 @@ static const struct tegra210_mixer_gain_params gain_params = { { 0, 0, 0x400, 0x8000000 }, }; -static int __maybe_unused tegra210_mixer_runtime_suspend(struct device *dev) +static int tegra210_mixer_runtime_suspend(struct device *dev) { struct tegra210_mixer *mixer = dev_get_drvdata(dev); @@ -83,7 +83,7 @@ static int __maybe_unused tegra210_mixer_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra210_mixer_runtime_resume(struct device *dev) +static int tegra210_mixer_runtime_resume(struct device *dev) { struct tegra210_mixer *mixer = dev_get_drvdata(dev); @@ -666,17 +666,16 @@ static void tegra210_mixer_platform_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra210_mixer_pm_ops = { - SET_RUNTIME_PM_OPS(tegra210_mixer_runtime_suspend, - tegra210_mixer_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra210_mixer_runtime_suspend, + tegra210_mixer_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra210_mixer_driver = { .driver = { .name = "tegra210_mixer", .of_match_table = tegra210_mixer_of_match, - .pm = &tegra210_mixer_pm_ops, + .pm = pm_ptr(&tegra210_mixer_pm_ops), }, .probe = tegra210_mixer_platform_probe, .remove = tegra210_mixer_platform_remove, diff --git a/sound/soc/tegra/tegra210_mvc.c b/sound/soc/tegra/tegra210_mvc.c index 119f17501478..35b14c8396f4 100644 --- a/sound/soc/tegra/tegra210_mvc.c +++ b/sound/soc/tegra/tegra210_mvc.c @@ -47,7 +47,7 @@ static const struct tegra210_mvc_gain_params gain_params = { .duration_inv = 14316558, }; -static int __maybe_unused tegra210_mvc_runtime_suspend(struct device *dev) +static int tegra210_mvc_runtime_suspend(struct device *dev) { struct tegra210_mvc *mvc = dev_get_drvdata(dev); @@ -59,7 +59,7 @@ static int __maybe_unused tegra210_mvc_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra210_mvc_runtime_resume(struct device *dev) +static int tegra210_mvc_runtime_resume(struct device *dev) { struct tegra210_mvc *mvc = dev_get_drvdata(dev); @@ -758,17 +758,16 @@ static void tegra210_mvc_platform_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra210_mvc_pm_ops = { - SET_RUNTIME_PM_OPS(tegra210_mvc_runtime_suspend, - tegra210_mvc_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra210_mvc_runtime_suspend, + tegra210_mvc_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra210_mvc_driver = { .driver = { .name = "tegra210-mvc", .of_match_table = tegra210_mvc_of_match, - .pm = &tegra210_mvc_pm_ops, + .pm = pm_ptr(&tegra210_mvc_pm_ops), }, .probe = tegra210_mvc_platform_probe, .remove = tegra210_mvc_platform_remove, diff --git a/sound/soc/tegra/tegra210_ope.c b/sound/soc/tegra/tegra210_ope.c index c595cec9baab..5036bcfe0828 100644 --- a/sound/soc/tegra/tegra210_ope.c +++ b/sound/soc/tegra/tegra210_ope.c @@ -356,7 +356,7 @@ static void tegra210_ope_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused tegra210_ope_runtime_suspend(struct device *dev) +static int tegra210_ope_runtime_suspend(struct device *dev) { struct tegra210_ope *ope = dev_get_drvdata(dev); @@ -374,7 +374,7 @@ static int __maybe_unused tegra210_ope_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra210_ope_runtime_resume(struct device *dev) +static int tegra210_ope_runtime_resume(struct device *dev) { struct tegra210_ope *ope = dev_get_drvdata(dev); @@ -393,10 +393,9 @@ static int __maybe_unused tegra210_ope_runtime_resume(struct device *dev) } static const struct dev_pm_ops tegra210_ope_pm_ops = { - SET_RUNTIME_PM_OPS(tegra210_ope_runtime_suspend, - tegra210_ope_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra210_ope_runtime_suspend, + tegra210_ope_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static const struct of_device_id tegra210_ope_of_match[] = { @@ -409,7 +408,7 @@ static struct platform_driver tegra210_ope_driver = { .driver = { .name = "tegra210-ope", .of_match_table = tegra210_ope_of_match, - .pm = &tegra210_ope_pm_ops, + .pm = pm_ptr(&tegra210_ope_pm_ops), }, .probe = tegra210_ope_probe, .remove = tegra210_ope_remove, diff --git a/sound/soc/tegra/tegra210_sfc.c b/sound/soc/tegra/tegra210_sfc.c index df88708c733c..a0bd36f12c68 100644 --- a/sound/soc/tegra/tegra210_sfc.c +++ b/sound/soc/tegra/tegra210_sfc.c @@ -3056,7 +3056,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { }, }; -static int __maybe_unused tegra210_sfc_runtime_suspend(struct device *dev) +static int tegra210_sfc_runtime_suspend(struct device *dev) { struct tegra210_sfc *sfc = dev_get_drvdata(dev); @@ -3066,7 +3066,7 @@ static int __maybe_unused tegra210_sfc_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused tegra210_sfc_runtime_resume(struct device *dev) +static int tegra210_sfc_runtime_resume(struct device *dev) { struct tegra210_sfc *sfc = dev_get_drvdata(dev); @@ -3623,17 +3623,16 @@ static void tegra210_sfc_platform_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra210_sfc_pm_ops = { - SET_RUNTIME_PM_OPS(tegra210_sfc_runtime_suspend, - tegra210_sfc_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra210_sfc_runtime_suspend, + tegra210_sfc_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra210_sfc_driver = { .driver = { .name = "tegra210-sfc", .of_match_table = tegra210_sfc_of_match, - .pm = &tegra210_sfc_pm_ops, + .pm = pm_ptr(&tegra210_sfc_pm_ops), }, .probe = tegra210_sfc_platform_probe, .remove = tegra210_sfc_platform_remove, From patchwork Thu Mar 13 17:41:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015683 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7893B1DC985 for ; Thu, 13 Mar 2025 17:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887991; cv=none; b=SDZJu7tmTVm+uhU4l4LMMssjqvp99V5o46jJOZFw44nYsXPATpMGQ+UDqJO5ZPptoAFIPmPnawi41UVQsShIO33uXV5zRZ3yh7tomlQwc3/gS0HYIFqRADrCU9niy5iSArGZr7OktC32yRJNkHmvjYtP8K0VG7aMI/UnQ0in5Mo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887991; c=relaxed/simple; bh=TJrd6RoTEXVna6WdAiw4BMIpBFKHdpUX5MN1/we8FPY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PKIKiKgHE5iAHhjX8bjng0ovL+eywnNiJfe+ArVJ81l/5ljV4Zfz0AhUPrstCPEqUAHttw9kPafmpd5+TzFzOjjCGFwVhNtrzpPjzs/DWE6cftEX5zor6cLrmyDRsGshWlk+HmslDyJ+fbSrbyYbHEwzfOlNs/xUeEb2EjjHDxE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=wdEmAgkK; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+C+jhO5+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=wdEmAgkK; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=+C+jhO5+; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="wdEmAgkK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+C+jhO5+"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="wdEmAgkK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="+C+jhO5+" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 20CE9211FD; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PI0KwWmVuhJxiabpkOD4eBGyep2DguTNqxaoLv52Tu4=; b=wdEmAgkKnaf49a83KnI9kVOKGQmPNP91j4yJtUJB7Sq2PUDOxdTKXXjt/Q3ng40t72gZIT t+Hv/KntERPT5oOBrFT8xkRnL9FTOAD+aFL/RFi/3WHpYTPqT+MZQd+7hJLzP2d2J794pU 33nX+Fs761q/pwxvYs0z/fFZqo14fg4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PI0KwWmVuhJxiabpkOD4eBGyep2DguTNqxaoLv52Tu4=; b=+C+jhO5+UblVM4OxjLyq0HFpjgdfND/UCwGKfYWz34i8BdRi2EqN8ZXOK+D9kmNuE1S8LV jLcJCiwe4VpU9VDw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PI0KwWmVuhJxiabpkOD4eBGyep2DguTNqxaoLv52Tu4=; b=wdEmAgkKnaf49a83KnI9kVOKGQmPNP91j4yJtUJB7Sq2PUDOxdTKXXjt/Q3ng40t72gZIT t+Hv/KntERPT5oOBrFT8xkRnL9FTOAD+aFL/RFi/3WHpYTPqT+MZQd+7hJLzP2d2J794pU 33nX+Fs761q/pwxvYs0z/fFZqo14fg4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PI0KwWmVuhJxiabpkOD4eBGyep2DguTNqxaoLv52Tu4=; b=+C+jhO5+UblVM4OxjLyq0HFpjgdfND/UCwGKfYWz34i8BdRi2EqN8ZXOK+D9kmNuE1S8LV jLcJCiwe4VpU9VDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E39AA139D2; Thu, 13 Mar 2025 17:42:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id iOJPNvAY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:08 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 85/89] ASoC: tegra20: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:30 +0100 Message-ID: <20250313174139.29942-86-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_RATELIMIT(0.00)[to_ip_from(RL5j9wc7mf8ens4usejdmaiz8d)]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCVD_TLS_ALL(0.00)[] X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: linux-tegra@vger.kernel.org Signed-off-by: Takashi Iwai --- sound/soc/tegra/tegra20_i2s.c | 13 ++++++------- sound/soc/tegra/tegra20_spdif.c | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c index 3b9823d1a87a..51df0835ce3e 100644 --- a/sound/soc/tegra/tegra20_i2s.c +++ b/sound/soc/tegra/tegra20_i2s.c @@ -34,7 +34,7 @@ #define DRV_NAME "tegra20-i2s" -static __maybe_unused int tegra20_i2s_runtime_suspend(struct device *dev) +static int tegra20_i2s_runtime_suspend(struct device *dev) { struct tegra20_i2s *i2s = dev_get_drvdata(dev); @@ -45,7 +45,7 @@ static __maybe_unused int tegra20_i2s_runtime_suspend(struct device *dev) return 0; } -static __maybe_unused int tegra20_i2s_runtime_resume(struct device *dev) +static int tegra20_i2s_runtime_resume(struct device *dev) { struct tegra20_i2s *i2s = dev_get_drvdata(dev); int ret; @@ -487,17 +487,16 @@ static const struct of_device_id tegra20_i2s_of_match[] = { }; static const struct dev_pm_ops tegra20_i2s_pm_ops = { - SET_RUNTIME_PM_OPS(tegra20_i2s_runtime_suspend, - tegra20_i2s_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra20_i2s_runtime_suspend, + tegra20_i2s_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra20_i2s_driver = { .driver = { .name = DRV_NAME, .of_match_table = tegra20_i2s_of_match, - .pm = &tegra20_i2s_pm_ops, + .pm = pm_ptr(&tegra20_i2s_pm_ops), }, .probe = tegra20_i2s_platform_probe, .remove = tegra20_i2s_platform_remove, diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 380011233eb1..38661d9b4a7c 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c @@ -25,7 +25,7 @@ #include "tegra20_spdif.h" -static __maybe_unused int tegra20_spdif_runtime_suspend(struct device *dev) +static int tegra20_spdif_runtime_suspend(struct device *dev) { struct tegra20_spdif *spdif = dev_get_drvdata(dev); @@ -36,7 +36,7 @@ static __maybe_unused int tegra20_spdif_runtime_suspend(struct device *dev) return 0; } -static __maybe_unused int tegra20_spdif_runtime_resume(struct device *dev) +static int tegra20_spdif_runtime_resume(struct device *dev) { struct tegra20_spdif *spdif = dev_get_drvdata(dev); int ret; @@ -403,10 +403,9 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) } static const struct dev_pm_ops tegra20_spdif_pm_ops = { - SET_RUNTIME_PM_OPS(tegra20_spdif_runtime_suspend, - tegra20_spdif_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra20_spdif_runtime_suspend, + tegra20_spdif_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static const struct of_device_id tegra20_spdif_of_match[] = { @@ -418,7 +417,7 @@ MODULE_DEVICE_TABLE(of, tegra20_spdif_of_match); static struct platform_driver tegra20_spdif_driver = { .driver = { .name = "tegra20-spdif", - .pm = &tegra20_spdif_pm_ops, + .pm = pm_ptr(&tegra20_spdif_pm_ops), .of_match_table = tegra20_spdif_of_match, }, .probe = tegra20_spdif_platform_probe, From patchwork Thu Mar 13 17:41:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015684 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FC8E1DC985 for ; Thu, 13 Mar 2025 17:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887998; cv=none; b=nddVkQlXihehQ+nHjlmEhzI6vMoFV1JffQO3defBNKp7oIIJu4wmYCpv8YKes6d5WEcs3dqvWLbMO7dopswRpMDgPSkpGCYfCqnnqFYURakFzze2lXC1By9eQFgWTax9O1h5UpjGAo+DXTHboyYSJeewb64zweZzFXSUSN5ZoiY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887998; c=relaxed/simple; bh=UygM9HkSavW5eORA2rgph5rCbxsItWJm3UmJv9FhkhY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kYEZxXxsS1vFKobGmN8khl02sR/OR0cTEWVoOpxhLvMyTQI4dnb+2KsSUWqhdk8TpshNjO38BTOuaBmwweiWch7FRRBF2zeP6ee3E4placF1UlRUwwli1G5SFLdWCSTslWbVP5LvOpCZVhseDRCwFTTZ3NR+iZJGPXY1JLxoWcI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Q6A3Rn1L; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=7yGnwBaz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Q6A3Rn1L; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=7yGnwBaz; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Q6A3Rn1L"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="7yGnwBaz"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Q6A3Rn1L"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="7yGnwBaz" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 428C4211FE; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ykk5inm0GX5Tutd8RGem8eSxAty+l/BUOcBAuDiiIzU=; b=Q6A3Rn1LbhTKiUYqpG+8CzhNY4ABFbg+Q3/wsbA2z8UtV8An7ag3QvhIfuQkNrY6JvJgBE Izn2Y+MdffNpw1etIVXfemX2G/SWI3DXu2uAWGnrtam5cCWilk3n1xAd6yrsrkuzbBCN+5 u7Zs3xBAjbLhz/GQV/C6WoSx7empq3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ykk5inm0GX5Tutd8RGem8eSxAty+l/BUOcBAuDiiIzU=; b=7yGnwBazAjcdS06ivYFWHq+JLTRJoFKTO1Jay8ybxEAZJp3lJd6ZTHdxTytzeFCvGUNAvY WTUgx1RBWM5c3EAQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Q6A3Rn1L; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=7yGnwBaz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ykk5inm0GX5Tutd8RGem8eSxAty+l/BUOcBAuDiiIzU=; b=Q6A3Rn1LbhTKiUYqpG+8CzhNY4ABFbg+Q3/wsbA2z8UtV8An7ag3QvhIfuQkNrY6JvJgBE Izn2Y+MdffNpw1etIVXfemX2G/SWI3DXu2uAWGnrtam5cCWilk3n1xAd6yrsrkuzbBCN+5 u7Zs3xBAjbLhz/GQV/C6WoSx7empq3E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ykk5inm0GX5Tutd8RGem8eSxAty+l/BUOcBAuDiiIzU=; b=7yGnwBazAjcdS06ivYFWHq+JLTRJoFKTO1Jay8ybxEAZJp3lJd6ZTHdxTytzeFCvGUNAvY WTUgx1RBWM5c3EAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1C0B2137BA; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id SNmhBfEY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:09 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 86/89] ASoC: tegra30: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:31 +0100 Message-ID: <20250313174139.29942-87-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 428C4211FE X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Cc: linux-tegra@vger.kernel.org Signed-off-by: Takashi Iwai --- sound/soc/tegra/tegra30_ahub.c | 13 ++++++------- sound/soc/tegra/tegra30_i2s.c | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index c9b52f54cea8..51e5ab6c276b 100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c @@ -40,7 +40,7 @@ static inline void tegra30_audio_write(u32 reg, u32 val) regmap_write(ahub->regmap_ahub, reg, val); } -static __maybe_unused int tegra30_ahub_runtime_suspend(struct device *dev) +static int tegra30_ahub_runtime_suspend(struct device *dev) { regcache_cache_only(ahub->regmap_apbif, true); regcache_cache_only(ahub->regmap_ahub, true); @@ -61,7 +61,7 @@ static __maybe_unused int tegra30_ahub_runtime_suspend(struct device *dev) * stopping streams should dynamically adjust the clock as required. However, * this is not yet implemented. */ -static __maybe_unused int tegra30_ahub_runtime_resume(struct device *dev) +static int tegra30_ahub_runtime_resume(struct device *dev) { int ret; @@ -600,10 +600,9 @@ static void tegra30_ahub_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra30_ahub_pm_ops = { - SET_RUNTIME_PM_OPS(tegra30_ahub_runtime_suspend, - tegra30_ahub_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra30_ahub_runtime_suspend, + tegra30_ahub_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra30_ahub_driver = { @@ -612,7 +611,7 @@ static struct platform_driver tegra30_ahub_driver = { .driver = { .name = DRV_NAME, .of_match_table = tegra30_ahub_of_match, - .pm = &tegra30_ahub_pm_ops, + .pm = pm_ptr(&tegra30_ahub_pm_ops), }, }; module_platform_driver(tegra30_ahub_driver); diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index 0d3badfbe143..b121af9ef8ed 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c @@ -35,7 +35,7 @@ #define DRV_NAME "tegra30-i2s" -static __maybe_unused int tegra30_i2s_runtime_suspend(struct device *dev) +static int tegra30_i2s_runtime_suspend(struct device *dev) { struct tegra30_i2s *i2s = dev_get_drvdata(dev); @@ -46,7 +46,7 @@ static __maybe_unused int tegra30_i2s_runtime_suspend(struct device *dev) return 0; } -static __maybe_unused int tegra30_i2s_runtime_resume(struct device *dev) +static int tegra30_i2s_runtime_resume(struct device *dev) { struct tegra30_i2s *i2s = dev_get_drvdata(dev); int ret; @@ -547,17 +547,16 @@ static void tegra30_i2s_platform_remove(struct platform_device *pdev) } static const struct dev_pm_ops tegra30_i2s_pm_ops = { - SET_RUNTIME_PM_OPS(tegra30_i2s_runtime_suspend, - tegra30_i2s_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + RUNTIME_PM_OPS(tegra30_i2s_runtime_suspend, + tegra30_i2s_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) }; static struct platform_driver tegra30_i2s_driver = { .driver = { .name = DRV_NAME, .of_match_table = tegra30_i2s_of_match, - .pm = &tegra30_i2s_pm_ops, + .pm = pm_ptr(&tegra30_i2s_pm_ops), }, .probe = tegra30_i2s_platform_probe, .remove = tegra30_i2s_platform_remove, From patchwork Thu Mar 13 17:41:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015685 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C20E1DC985 for ; Thu, 13 Mar 2025 17:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741888004; cv=none; b=i5yUprAp93dSMs9QrCj4wVIe2OhcheQlgalffYWLz5f+FUgDnYMsCDruRFdTtMVDCzN6t2gyuxMhyrbIyOEKF/dCYSQp6aZ53v3SyWjyWR3+ONj4uKy462GaCdhClp2cg1/6XHw9hx45IReENqKM2wy1H15dTmeX9qyf2Wy96uw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741888004; c=relaxed/simple; bh=i8XgxxUTBHf0STe7J/WS/0BMS5yuL42JssczC8QI7uI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F9rsrchgvFMfQPhwYQaR4xGcLg6iFOZTE38/8AlI2YYLVQagw2BbGI/3dFGO0zbgxr7snqgE+m4vMV3WhLa1axy+LGGxB2LC+nbIr7kDYI8XmktVOKaOz+NZ4oEXJipKl8w/u5mzaFTnfAw/HUY7ELgBnQmjjevKiydn5IY3zF4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=QPI2X3A7; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=R0ZGMAXh; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=QPI2X3A7; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=R0ZGMAXh; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="QPI2X3A7"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="R0ZGMAXh"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="QPI2X3A7"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="R0ZGMAXh" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6CCE2211FF; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IGk43MJv2LL3ItCvgdJUy8nTcbmSzwSdCLlSswLFCtI=; b=QPI2X3A7HnKOtC3TA4s+zvJKYQL8V6KoMHLAWZ929LLs7PeWvT5U6Qp/z/ML4AIH59sucH LOcJ/CHAkymlnL9VYLyQtPG7okpMNApONhFjBGXgrGtA2CrozfOUTtf1E+JBaqibhxNBsZ G2PSN0p0eaBkwioVtxRvDT6fsIud/FM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IGk43MJv2LL3ItCvgdJUy8nTcbmSzwSdCLlSswLFCtI=; b=R0ZGMAXh2mq9YCojVOuRuxywrePECRcRFj6WdU57G3WaNMrUTMIarPAzIPHvKSvc6RqfDm sboRxbnGLgW62aCQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=QPI2X3A7; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=R0ZGMAXh DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IGk43MJv2LL3ItCvgdJUy8nTcbmSzwSdCLlSswLFCtI=; b=QPI2X3A7HnKOtC3TA4s+zvJKYQL8V6KoMHLAWZ929LLs7PeWvT5U6Qp/z/ML4AIH59sucH LOcJ/CHAkymlnL9VYLyQtPG7okpMNApONhFjBGXgrGtA2CrozfOUTtf1E+JBaqibhxNBsZ G2PSN0p0eaBkwioVtxRvDT6fsIud/FM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IGk43MJv2LL3ItCvgdJUy8nTcbmSzwSdCLlSswLFCtI=; b=R0ZGMAXh2mq9YCojVOuRuxywrePECRcRFj6WdU57G3WaNMrUTMIarPAzIPHvKSvc6RqfDm sboRxbnGLgW62aCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 486A1139D2; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id AJ1rEPEY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:09 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Max Filippov Subject: [PATCH 87/89] ASoC: xtensa: Convert to RUNTIME_PM_OPS() Date: Thu, 13 Mar 2025 18:41:32 +0100 Message-ID: <20250313174139.29942-88-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 6CCE2211FF X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; FREEMAIL_CC(0.00)[vger.kernel.org,gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DKIM_TRACE(0.00)[suse.de:+]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_PM_OPS() together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Cc: Max Filippov Signed-off-by: Takashi Iwai Reviewed-by: Max Filippov --- sound/soc/xtensa/xtfpga-i2s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/xtensa/xtfpga-i2s.c b/sound/soc/xtensa/xtfpga-i2s.c index 4eaa9011405f..678ded059b95 100644 --- a/sound/soc/xtensa/xtfpga-i2s.c +++ b/sound/soc/xtensa/xtfpga-i2s.c @@ -629,8 +629,8 @@ MODULE_DEVICE_TABLE(of, xtfpga_i2s_of_match); #endif static const struct dev_pm_ops xtfpga_i2s_pm_ops = { - SET_RUNTIME_PM_OPS(xtfpga_i2s_runtime_suspend, - xtfpga_i2s_runtime_resume, NULL) + RUNTIME_PM_OPS(xtfpga_i2s_runtime_suspend, + xtfpga_i2s_runtime_resume, NULL) }; static struct platform_driver xtfpga_i2s_driver = { @@ -639,7 +639,7 @@ static struct platform_driver xtfpga_i2s_driver = { .driver = { .name = "xtfpga-i2s", .of_match_table = of_match_ptr(xtfpga_i2s_of_match), - .pm = &xtfpga_i2s_pm_ops, + .pm = pm_ptr(&xtfpga_i2s_pm_ops), }, }; From patchwork Thu Mar 13 17:41:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015672 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DDA31D5CD4 for ; Thu, 13 Mar 2025 17:46:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887968; cv=none; b=BNt9phk+p084xepw66+7miPmCIKBbxariYGvrLNG9namwSdZf7XyRDCuTZtQ4abxCY7w/Z59t72xuRAS76YRXx4oqsRNy1J4U3t2ZbWkIQJZXGmoeodvIn4xay/ps6IDNbjxKBckbvlEf7yXl+drpnghAeJqtaLPhLa42Pu1FmY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887968; c=relaxed/simple; bh=rQBACE/nmNHIJ2J46iPYsanZKBs7gE8Sop5l4HwWN1c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bPgRgjmiKpHLI5FB/rzDW3nu2BbLMp5WTfCV+jJB+GctCzZU322na86jdE9vEWzufIuYS+xfdHRM/ihrc63wSvx034BZTXTcwGIMSKI4A53cspw6mzE9hecWdJTC6mCgqPYlg0/+9CANNNbaBXe7Ra/uy/1GDRlZh2WqBTm6Z4g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=BRT66L84; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=j9Nds4mA; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=BRT66L84; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=j9Nds4mA; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="BRT66L84"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="j9Nds4mA"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="BRT66L84"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="j9Nds4mA" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 970C01F793; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=th0YCbaFHsS59aejZhCj1HnW/u49al+2uQ9froe03EY=; b=BRT66L84BYcciXE52d+YoUGhb8ULKCsQwAhcK6u/FY1qm/rywpyiZ2Cs92MKJGTP4VoQFi o47u6+8NcF7tPJ0vxRztqXiENj59TaSdcznGww45qC+GgwmczFiMSMCWGtHbIUiemc0ijh ktRG5te7gBWCF2x730W8jJ8UpPkLu54= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=th0YCbaFHsS59aejZhCj1HnW/u49al+2uQ9froe03EY=; b=j9Nds4mAf5roQDoxKGO1zy4vD9gHQKGrpxRfXxGVr8z15MPORFD58BtREL9xFo51EGYIAP mHecfY5Vfpg952BQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=BRT66L84; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=j9Nds4mA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=th0YCbaFHsS59aejZhCj1HnW/u49al+2uQ9froe03EY=; b=BRT66L84BYcciXE52d+YoUGhb8ULKCsQwAhcK6u/FY1qm/rywpyiZ2Cs92MKJGTP4VoQFi o47u6+8NcF7tPJ0vxRztqXiENj59TaSdcznGww45qC+GgwmczFiMSMCWGtHbIUiemc0ijh ktRG5te7gBWCF2x730W8jJ8UpPkLu54= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=th0YCbaFHsS59aejZhCj1HnW/u49al+2uQ9froe03EY=; b=j9Nds4mAf5roQDoxKGO1zy4vD9gHQKGrpxRfXxGVr8z15MPORFD58BtREL9xFo51EGYIAP mHecfY5Vfpg952BQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 744B6137BA; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EH/2GvEY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:09 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org Subject: [PATCH 88/89] ASoC: amd: Convert to RUNTIME_PM_OPS() & co Date: Thu, 13 Mar 2025 18:41:33 +0100 Message-ID: <20250313174139.29942-89-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 970C01F793 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Use the newer RUNTIE_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai --- sound/soc/amd/acp/acp-pci.c | 10 +++++----- sound/soc/amd/acp/acp-rembrandt.c | 6 +++--- sound/soc/amd/acp/acp-renoir.c | 6 +++--- sound/soc/amd/acp/acp63.c | 6 +++--- sound/soc/amd/acp/acp70.c | 6 +++--- sound/soc/amd/ps/pci-ps.c | 12 ++++++------ sound/soc/amd/ps/ps-pdm-dma.c | 12 ++++++------ sound/soc/amd/ps/ps-sdw-dma.c | 6 +++--- sound/soc/amd/rpl/rpl-pci-acp6x.c | 10 +++++----- sound/soc/amd/vangogh/acp5x-pcm-dma.c | 11 +++++------ sound/soc/amd/yc/acp6x-pdm-dma.c | 12 ++++++------ sound/soc/amd/yc/pci-acp6x.c | 10 +++++----- 12 files changed, 53 insertions(+), 54 deletions(-) diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c index 9322379cb36f..de1cdca5ade7 100644 --- a/sound/soc/amd/acp/acp-pci.c +++ b/sound/soc/amd/acp/acp-pci.c @@ -221,7 +221,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id return ret; }; -static int __maybe_unused snd_acp_suspend(struct device *dev) +static int snd_acp_suspend(struct device *dev) { struct acp_chip_info *chip; int ret; @@ -233,7 +233,7 @@ static int __maybe_unused snd_acp_suspend(struct device *dev) return ret; } -static int __maybe_unused snd_acp_resume(struct device *dev) +static int snd_acp_resume(struct device *dev) { struct acp_chip_info *chip; int ret; @@ -251,8 +251,8 @@ static int __maybe_unused snd_acp_resume(struct device *dev) } static const struct dev_pm_ops acp_pm_ops = { - SET_RUNTIME_PM_OPS(snd_acp_suspend, snd_acp_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(snd_acp_suspend, snd_acp_resume) + RUNTIME_PM_OPS(snd_acp_suspend, snd_acp_resume, NULL) + SYSTEM_SLEEP_PM_OPS(snd_acp_suspend, snd_acp_resume) }; static void acp_pci_remove(struct pci_dev *pci) @@ -289,7 +289,7 @@ static struct pci_driver snd_amd_acp_pci_driver = { .probe = acp_pci_probe, .remove = acp_pci_remove, .driver = { - .pm = &acp_pm_ops, + .pm = pm_ptr(&acp_pm_ops), }, }; module_pci_driver(snd_amd_acp_pci_driver); diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c index 21614e2e1b6c..746b6ed72029 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -197,7 +197,7 @@ static void rembrandt_audio_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused rmb_pcm_resume(struct device *dev) +static int rmb_pcm_resume(struct device *dev) { struct acp_chip_info *chip = dev_get_platdata(dev); struct acp_stream *stream; @@ -227,7 +227,7 @@ static int __maybe_unused rmb_pcm_resume(struct device *dev) } static const struct dev_pm_ops rmb_dma_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(NULL, rmb_pcm_resume) + SYSTEM_SLEEP_PM_OPS(NULL, rmb_pcm_resume) }; static struct platform_driver rembrandt_driver = { @@ -235,7 +235,7 @@ static struct platform_driver rembrandt_driver = { .remove = rembrandt_audio_remove, .driver = { .name = "acp_asoc_rembrandt", - .pm = &rmb_dma_pm_ops, + .pm = pm_ptr(&rmb_dma_pm_ops), }, }; diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index b8ded929d52e..ebf0106fc737 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -144,7 +144,7 @@ static void renoir_audio_remove(struct platform_device *pdev) acp_platform_unregister(dev); } -static int __maybe_unused rn_pcm_resume(struct device *dev) +static int rn_pcm_resume(struct device *dev) { struct acp_chip_info *chip = dev_get_platdata(dev); struct acp_stream *stream; @@ -171,7 +171,7 @@ static int __maybe_unused rn_pcm_resume(struct device *dev) } static const struct dev_pm_ops rn_dma_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(NULL, rn_pcm_resume) + SYSTEM_SLEEP_PM_OPS(NULL, rn_pcm_resume) }; static struct platform_driver renoir_driver = { @@ -179,7 +179,7 @@ static struct platform_driver renoir_driver = { .remove = renoir_audio_remove, .driver = { .name = "acp_asoc_renoir", - .pm = &rn_dma_pm_ops, + .pm = pm_ptr(&rn_dma_pm_ops), }, }; diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c index 53c013a64854..52d895e624c7 100644 --- a/sound/soc/amd/acp/acp63.c +++ b/sound/soc/amd/acp/acp63.c @@ -248,7 +248,7 @@ static void acp63_audio_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused acp63_pcm_resume(struct device *dev) +static int acp63_pcm_resume(struct device *dev) { struct acp_chip_info *chip = dev_get_platdata(dev); struct acp_stream *stream; @@ -278,7 +278,7 @@ static int __maybe_unused acp63_pcm_resume(struct device *dev) } static const struct dev_pm_ops acp63_dma_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(NULL, acp63_pcm_resume) + SYSTEM_SLEEP_PM_OPS(NULL, acp63_pcm_resume) }; static struct platform_driver acp63_driver = { @@ -286,7 +286,7 @@ static struct platform_driver acp63_driver = { .remove = acp63_audio_remove, .driver = { .name = "acp_asoc_acp63", - .pm = &acp63_dma_pm_ops, + .pm = pm_ptr(&acp63_dma_pm_ops), }, }; diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index 1a89f8a3724f..6d5f5ade075c 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -180,7 +180,7 @@ static void acp_acp70_audio_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused acp70_pcm_resume(struct device *dev) +static int acp70_pcm_resume(struct device *dev) { struct acp_chip_info *chip = dev_get_platdata(dev); struct acp_stream *stream; @@ -207,7 +207,7 @@ static int __maybe_unused acp70_pcm_resume(struct device *dev) } static const struct dev_pm_ops acp70_dma_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(NULL, acp70_pcm_resume) + SYSTEM_SLEEP_PM_OPS(NULL, acp70_pcm_resume) }; static struct platform_driver acp70_driver = { @@ -215,7 +215,7 @@ static struct platform_driver acp70_driver = { .remove = acp_acp70_audio_remove, .driver = { .name = "acp_asoc_acp70", - .pm = &acp70_dma_pm_ops, + .pm = pm_ptr(&acp70_dma_pm_ops), }, }; diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c index 221c65ff03c9..8e57f31ef7f7 100644 --- a/sound/soc/amd/ps/pci-ps.c +++ b/sound/soc/amd/ps/pci-ps.c @@ -668,24 +668,24 @@ static int snd_acp63_probe(struct pci_dev *pci, return ret; } -static int __maybe_unused snd_acp_suspend(struct device *dev) +static int snd_acp_suspend(struct device *dev) { return acp_hw_suspend(dev); } -static int __maybe_unused snd_acp_runtime_resume(struct device *dev) +static int snd_acp_runtime_resume(struct device *dev) { return acp_hw_runtime_resume(dev); } -static int __maybe_unused snd_acp_resume(struct device *dev) +static int snd_acp_resume(struct device *dev) { return acp_hw_resume(dev); } static const struct dev_pm_ops acp63_pm_ops = { - SET_RUNTIME_PM_OPS(snd_acp_suspend, snd_acp_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(snd_acp_suspend, snd_acp_resume) + RUNTIME_PM_OPS(snd_acp_suspend, snd_acp_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(snd_acp_suspend, snd_acp_resume) }; static void snd_acp63_remove(struct pci_dev *pci) @@ -727,7 +727,7 @@ static struct pci_driver ps_acp63_driver = { .probe = snd_acp63_probe, .remove = snd_acp63_remove, .driver = { - .pm = &acp63_pm_ops, + .pm = pm_ptr(&acp63_pm_ops), } }; diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c index 7cdeb34e8f73..9cfbe05ad996 100644 --- a/sound/soc/amd/ps/ps-pdm-dma.c +++ b/sound/soc/amd/ps/ps-pdm-dma.c @@ -402,7 +402,7 @@ static void acp63_pdm_audio_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused acp63_pdm_resume(struct device *dev) +static int acp63_pdm_resume(struct device *dev) { struct pdm_dev_data *adata; struct snd_pcm_runtime *runtime; @@ -423,7 +423,7 @@ static int __maybe_unused acp63_pdm_resume(struct device *dev) return 0; } -static int __maybe_unused acp63_pdm_suspend(struct device *dev) +static int acp63_pdm_suspend(struct device *dev) { struct pdm_dev_data *adata; @@ -432,7 +432,7 @@ static int __maybe_unused acp63_pdm_suspend(struct device *dev) return 0; } -static int __maybe_unused acp63_pdm_runtime_resume(struct device *dev) +static int acp63_pdm_runtime_resume(struct device *dev) { struct pdm_dev_data *adata; @@ -442,8 +442,8 @@ static int __maybe_unused acp63_pdm_runtime_resume(struct device *dev) } static const struct dev_pm_ops acp63_pdm_pm_ops = { - SET_RUNTIME_PM_OPS(acp63_pdm_suspend, acp63_pdm_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(acp63_pdm_suspend, acp63_pdm_resume) + RUNTIME_PM_OPS(acp63_pdm_suspend, acp63_pdm_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(acp63_pdm_suspend, acp63_pdm_resume) }; static struct platform_driver acp63_pdm_dma_driver = { @@ -451,7 +451,7 @@ static struct platform_driver acp63_pdm_dma_driver = { .remove = acp63_pdm_audio_remove, .driver = { .name = "acp_ps_pdm_dma", - .pm = &acp63_pdm_pm_ops, + .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 21b336109c99..1b933a017c06 100644 --- a/sound/soc/amd/ps/ps-sdw-dma.c +++ b/sound/soc/amd/ps/ps-sdw-dma.c @@ -767,7 +767,7 @@ static int acp70_restore_sdw_dma_config(struct sdw_dma_dev_data *sdw_data) return 0; } -static int __maybe_unused acp63_sdw_pcm_resume(struct device *dev) +static int acp63_sdw_pcm_resume(struct device *dev) { struct sdw_dma_dev_data *sdw_data; @@ -779,7 +779,7 @@ static int __maybe_unused acp63_sdw_pcm_resume(struct device *dev) } static const struct dev_pm_ops acp63_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(NULL, acp63_sdw_pcm_resume) + SYSTEM_SLEEP_PM_OPS(NULL, acp63_sdw_pcm_resume) }; static struct platform_driver acp63_sdw_dma_driver = { @@ -787,7 +787,7 @@ static struct platform_driver acp63_sdw_dma_driver = { .remove = acp63_sdw_platform_remove, .driver = { .name = "amd_ps_sdw_dma", - .pm = &acp63_pm_ops, + .pm = pm_ptr(&acp63_pm_ops), }, }; diff --git a/sound/soc/amd/rpl/rpl-pci-acp6x.c b/sound/soc/amd/rpl/rpl-pci-acp6x.c index a8e548ed991b..e3afe9172bdf 100644 --- a/sound/soc/amd/rpl/rpl-pci-acp6x.c +++ b/sound/soc/amd/rpl/rpl-pci-acp6x.c @@ -159,7 +159,7 @@ static int snd_rpl_probe(struct pci_dev *pci, return ret; } -static int __maybe_unused snd_rpl_suspend(struct device *dev) +static int snd_rpl_suspend(struct device *dev) { struct rpl_dev_data *adata; int ret; @@ -171,7 +171,7 @@ static int __maybe_unused snd_rpl_suspend(struct device *dev) return ret; } -static int __maybe_unused snd_rpl_resume(struct device *dev) +static int snd_rpl_resume(struct device *dev) { struct rpl_dev_data *adata; int ret; @@ -184,8 +184,8 @@ static int __maybe_unused snd_rpl_resume(struct device *dev) } static const struct dev_pm_ops rpl_pm = { - SET_RUNTIME_PM_OPS(snd_rpl_suspend, snd_rpl_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(snd_rpl_suspend, snd_rpl_resume) + RUNTIME_PM_OPS(snd_rpl_suspend, snd_rpl_resume, NULL) + SYSTEM_SLEEP_PM_OPS(snd_rpl_suspend, snd_rpl_resume) }; static void snd_rpl_remove(struct pci_dev *pci) @@ -217,7 +217,7 @@ static struct pci_driver rpl_acp6x_driver = { .probe = snd_rpl_probe, .remove = snd_rpl_remove, .driver = { - .pm = &rpl_pm, + .pm = pm_ptr(&rpl_pm), } }; diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c index d5965f2b09bc..aa4726899434 100644 --- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c +++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c @@ -420,7 +420,7 @@ static void acp5x_audio_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused acp5x_pcm_resume(struct device *dev) +static int acp5x_pcm_resume(struct device *dev) { struct i2s_dev_data *adata; struct i2s_stream_instance *rtd; @@ -473,7 +473,7 @@ static int __maybe_unused acp5x_pcm_resume(struct device *dev) return 0; } -static int __maybe_unused acp5x_pcm_suspend(struct device *dev) +static int acp5x_pcm_suspend(struct device *dev) { struct i2s_dev_data *adata; @@ -482,7 +482,7 @@ static int __maybe_unused acp5x_pcm_suspend(struct device *dev) return 0; } -static int __maybe_unused acp5x_pcm_runtime_resume(struct device *dev) +static int acp5x_pcm_runtime_resume(struct device *dev) { struct i2s_dev_data *adata; @@ -492,9 +492,8 @@ static int __maybe_unused acp5x_pcm_runtime_resume(struct device *dev) } static const struct dev_pm_ops acp5x_pm_ops = { - SET_RUNTIME_PM_OPS(acp5x_pcm_suspend, - acp5x_pcm_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(acp5x_pcm_suspend, acp5x_pcm_resume) + RUNTIME_PM_OPS(acp5x_pcm_suspend, acp5x_pcm_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(acp5x_pcm_suspend, acp5x_pcm_resume) }; static struct platform_driver acp5x_dma_driver = { diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c index 3eb3e82efb10..ac758b90f441 100644 --- a/sound/soc/amd/yc/acp6x-pdm-dma.c +++ b/sound/soc/amd/yc/acp6x-pdm-dma.c @@ -394,7 +394,7 @@ static void acp6x_pdm_audio_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused acp6x_pdm_resume(struct device *dev) +static int acp6x_pdm_resume(struct device *dev) { struct pdm_dev_data *adata; struct snd_pcm_runtime *runtime; @@ -415,7 +415,7 @@ static int __maybe_unused acp6x_pdm_resume(struct device *dev) return 0; } -static int __maybe_unused acp6x_pdm_suspend(struct device *dev) +static int acp6x_pdm_suspend(struct device *dev) { struct pdm_dev_data *adata; @@ -424,7 +424,7 @@ static int __maybe_unused acp6x_pdm_suspend(struct device *dev) return 0; } -static int __maybe_unused acp6x_pdm_runtime_resume(struct device *dev) +static int acp6x_pdm_runtime_resume(struct device *dev) { struct pdm_dev_data *adata; @@ -434,8 +434,8 @@ static int __maybe_unused acp6x_pdm_runtime_resume(struct device *dev) } static const struct dev_pm_ops acp6x_pdm_pm_ops = { - SET_RUNTIME_PM_OPS(acp6x_pdm_suspend, acp6x_pdm_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(acp6x_pdm_suspend, acp6x_pdm_resume) + RUNTIME_PM_OPS(acp6x_pdm_suspend, acp6x_pdm_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(acp6x_pdm_suspend, acp6x_pdm_resume) }; static struct platform_driver acp6x_pdm_dma_driver = { @@ -443,7 +443,7 @@ static struct platform_driver acp6x_pdm_dma_driver = { .remove = acp6x_pdm_audio_remove, .driver = { .name = "acp_yc_pdm_dma", - .pm = &acp6x_pdm_pm_ops, + .pm = pm_ptr(&acp6x_pdm_pm_ops), }, }; diff --git a/sound/soc/amd/yc/pci-acp6x.c b/sound/soc/amd/yc/pci-acp6x.c index 7af6a349b1d4..1140ed1cbb3d 100644 --- a/sound/soc/amd/yc/pci-acp6x.c +++ b/sound/soc/amd/yc/pci-acp6x.c @@ -277,7 +277,7 @@ static int snd_acp6x_probe(struct pci_dev *pci, return ret; } -static int __maybe_unused snd_acp6x_suspend(struct device *dev) +static int snd_acp6x_suspend(struct device *dev) { struct acp6x_dev_data *adata; int ret; @@ -289,7 +289,7 @@ static int __maybe_unused snd_acp6x_suspend(struct device *dev) return ret; } -static int __maybe_unused snd_acp6x_resume(struct device *dev) +static int snd_acp6x_resume(struct device *dev) { struct acp6x_dev_data *adata; int ret; @@ -302,8 +302,8 @@ static int __maybe_unused snd_acp6x_resume(struct device *dev) } static const struct dev_pm_ops acp6x_pm = { - SET_RUNTIME_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume) + RUNTIME_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume, NULL) + SYSTEM_SLEEP_PM_OPS(snd_acp6x_suspend, snd_acp6x_resume) }; static void snd_acp6x_remove(struct pci_dev *pci) @@ -339,7 +339,7 @@ static struct pci_driver yc_acp6x_driver = { .probe = snd_acp6x_probe, .remove = snd_acp6x_remove, .driver = { - .pm = &acp6x_pm, + .pm = pm_ptr(&acp6x_pm), } }; From patchwork Thu Mar 13 17:41:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 14015674 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C8341DC985 for ; Thu, 13 Mar 2025 17:46:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887974; cv=none; b=RZ4tpBxMfZvQN/porAZGv+n8+a4W3yBTukuoBustortAPtxtCHJpGChUJ5gq++r7l+NJZle+rojGs4PdXhIeHoNDb5sQS5IjkLtYyHJDMkSM6oFf0Iq/k78h5e+Mg2b13NdmBq/b0zS10MPHjOzJiIGox6Uzou9YQzPcGljxF68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741887974; c=relaxed/simple; bh=lvWXI61rYqAZ89vtzD9kIJVTlRtM+P1et1ciWjSHOIA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WqZHQdlZV0SVWVdUPdealZ6U6b39PV54Ve6OncwjXLqXs82ewYD3oSZ185U+HKEynETNzbCiYxLnf/bybBCsdETRmmVJlrMV4u0wZ2WQ3KdZMyhEC6BdJQZ+fppQ5k7vFtatLH8eRNGUNWEs+FbNOOU8FSgNT45gOXMD3XeKIIk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=R5qTzF0q; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Bc49dErP; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=eeD77Iyo; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=CVHv8UwO; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="R5qTzF0q"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Bc49dErP"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="eeD77Iyo"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="CVHv8UwO" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CF3FE1F7B6; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887730; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUXO8KyxOMobs9DG6C+QDFkgUWUReomXF4XyrDgPPCg=; b=R5qTzF0qRD12Q3wEpI1nxOWcYePHAjkR823xFXynxnGWXK+NvgeKcEvw6OZMSXWQsYTMjf LZQPf/p5iuoh12qqWqiZ1NJuQe+/llvU2GkmIyhwSarS205R3bntaVTzyIJ3Sj8+FMErQ4 8dgLHAkgC4FPxUi84phsIxrThXMhmo4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887730; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUXO8KyxOMobs9DG6C+QDFkgUWUReomXF4XyrDgPPCg=; b=Bc49dErPusU2XBtXC2RVKqKYbDlISDxZLJP2SDCQCgv422+/9vsAC+spl0qg6N7t1iRMoa tnLMint7d1zbdPAQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=eeD77Iyo; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=CVHv8UwO DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUXO8KyxOMobs9DG6C+QDFkgUWUReomXF4XyrDgPPCg=; b=eeD77Iyo+bNs8HKs/1vlQSbnibUJC9+ZtpIOV4e36NrrElLLHbkvpRNW/VVtwqjAKROq8X RybSQztgiJoTKCpwipgktQ5keppF4cTJ7YwiWjrIp3QeEVdNOkObzBjzNfrrshwNZwOgYo UBbLjJLkrau/IXZ5FGmPLeh03DHDIrg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741887729; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RUXO8KyxOMobs9DG6C+QDFkgUWUReomXF4XyrDgPPCg=; b=CVHv8UwO6PznhIN0BUG8zy3JbtQ8mxW3YV0X2LIpBjGrda5ypo6NoQYlCUK9UBV4fPbr0e 39eqoblo1Mc5owBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9F096139D2; Thu, 13 Mar 2025 17:42:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id UEndJPEY02cFRQAAD6G6ig (envelope-from ); Thu, 13 Mar 2025 17:42:09 +0000 From: Takashi Iwai To: Mark Brown Cc: linux-sound@vger.kernel.org, Shenghao Ding , Kevin Lu , Baojun Xu Subject: [PATCH 89/89] ASoC: pcm3168a: Convert to EXPORT_GPL_DEV_PM_OPS() Date: Thu, 13 Mar 2025 18:41:34 +0100 Message-ID: <20250313174139.29942-90-tiwai@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250313174139.29942-1-tiwai@suse.de> References: <20250313174139.29942-1-tiwai@suse.de> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: CF3FE1F7B6 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLi691ga9brjh6qjnnbs1osk4o)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCPT_COUNT_FIVE(0.00)[5]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Use the newer EXPORT_GPL_DEV_PM_OPS() macro together with pm_ptr(). This allows us to drop superfluous CONFIG_PM ifdefs. This optimizes slightly when CONFIG_PM is disabled, too. Cc: Shenghao Ding Cc: Kevin Lu Cc: Baojun Xu Signed-off-by: Takashi Iwai --- sound/soc/codecs/pcm3168a-i2c.c | 2 +- sound/soc/codecs/pcm3168a-spi.c | 2 +- sound/soc/codecs/pcm3168a.c | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/pcm3168a-i2c.c b/sound/soc/codecs/pcm3168a-i2c.c index 4da608ba514d..ff18c74b616c 100644 --- a/sound/soc/codecs/pcm3168a-i2c.c +++ b/sound/soc/codecs/pcm3168a-i2c.c @@ -59,7 +59,7 @@ static struct i2c_driver pcm3168a_i2c_driver = { .name = "pcm3168a", .acpi_match_table = pcm3168a_acpi_match, .of_match_table = pcm3168a_of_match, - .pm = &pcm3168a_pm_ops, + .pm = pm_ptr(&pcm3168a_pm_ops), }, }; module_i2c_driver(pcm3168a_i2c_driver); diff --git a/sound/soc/codecs/pcm3168a-spi.c b/sound/soc/codecs/pcm3168a-spi.c index b5b08046f545..0871338eacba 100644 --- a/sound/soc/codecs/pcm3168a-spi.c +++ b/sound/soc/codecs/pcm3168a-spi.c @@ -50,7 +50,7 @@ static struct spi_driver pcm3168a_spi_driver = { .driver = { .name = "pcm3168a", .of_match_table = pcm3168a_of_match, - .pm = &pcm3168a_pm_ops, + .pm = pm_ptr(&pcm3168a_pm_ops), }, }; module_spi_driver(pcm3168a_spi_driver); diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c index df6836a652ef..c8617a488b11 100644 --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c @@ -849,7 +849,6 @@ void pcm3168a_remove(struct device *dev) } EXPORT_SYMBOL_GPL(pcm3168a_remove); -#ifdef CONFIG_PM static int pcm3168a_rt_resume(struct device *dev) { struct pcm3168a_priv *pcm3168a = dev_get_drvdata(dev); @@ -905,12 +904,10 @@ static int pcm3168a_rt_suspend(struct device *dev) return 0; } -#endif -const struct dev_pm_ops pcm3168a_pm_ops = { - SET_RUNTIME_PM_OPS(pcm3168a_rt_suspend, pcm3168a_rt_resume, NULL) +EXPORT_GPL_DEV_PM_OPS(pcm3168a_pm_ops) = { + RUNTIME_PM_OPS(pcm3168a_rt_suspend, pcm3168a_rt_resume, NULL) }; -EXPORT_SYMBOL_GPL(pcm3168a_pm_ops); MODULE_DESCRIPTION("PCM3168A codec driver"); MODULE_AUTHOR("Damien Horsley ");