dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/tidss: Make use of the helper macro SET_RUNTIME_PM_OPS()
@ 2021-08-28  8:52 Cai Huoqing
  2021-08-30 14:36 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2021-08-28  8:52 UTC (permalink / raw)
  To: jyri.sarha, tomba, airlied, daniel; +Cc: dri-devel, Cai Huoqing

Use the helper macro SET_RUNTIME_PM_OPS() instead of the verbose
operators ".runtime_suspend/.runtime_resume", because the
SET_RUNTIME_PM_OPS() is a nice helper macro that could be brought
in to make code a little clearer, a little more concise.

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/gpu/drm/tidss/tidss_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index d620f35688da..57605b80b526 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -91,9 +91,8 @@ static int __maybe_unused tidss_resume(struct device *dev)
 #ifdef CONFIG_PM
 
 static const struct dev_pm_ops tidss_pm_ops = {
-	.runtime_suspend = tidss_pm_runtime_suspend,
-	.runtime_resume = tidss_pm_runtime_resume,
 	SET_SYSTEM_SLEEP_PM_OPS(tidss_suspend, tidss_resume)
+	SET_RUNTIME_PM_OPS(tidss_pm_runtime_suspend, tidss_pm_runtime_resume, NULL)
 };
 
 #endif /* CONFIG_PM */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-30 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28  8:52 [PATCH] drm/tidss: Make use of the helper macro SET_RUNTIME_PM_OPS() Cai Huoqing
2021-08-30 14:36 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).