[PATCH] drm/tidss: Make use of the helper macro SET_RUNTIME_PM_OPS()

Cai Huoqing caihuoqing at baidu.com
Sat Aug 28 08:52:52 UTC 2021


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 at 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



More information about the dri-devel mailing list