All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/gma500: Make use of the helper macro SET_RUNTIME_PM_OPS()
@ 2021-08-28  8:43 Cai Huoqing
  0 siblings, 0 replies; only message in thread
From: Cai Huoqing @ 2021-08-28  8:43 UTC (permalink / raw)
  To: patrik.r.jakobsson, airlied, daniel; +Cc: dri-devel, Cai Huoqing

Use the helper macro SET_RUNTIME_PM_OPS() instead of the verbose
operators ".runtime_suspend/.runtime_resume/.runtime_idle", 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/gma500/psb_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 58bce1a60a4d..d5bfa1d5c074 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -489,14 +489,12 @@ static void psb_pci_remove(struct pci_dev *pdev)
 }
 
 static const struct dev_pm_ops psb_pm_ops = {
+	SET_RUNTIME_PM_OPS(psb_runtime_suspend, psb_runtime_resume, psb_runtime_idle)
 	.resume = gma_power_resume,
 	.suspend = gma_power_suspend,
 	.thaw = gma_power_thaw,
 	.freeze = gma_power_freeze,
 	.restore = gma_power_restore,
-	.runtime_suspend = psb_runtime_suspend,
-	.runtime_resume = psb_runtime_resume,
-	.runtime_idle = psb_runtime_idle,
 };
 
 static const struct file_operations psb_gem_fops = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-28  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28  8:43 [PATCH] drm/gma500: Make use of the helper macro SET_RUNTIME_PM_OPS() Cai Huoqing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.