From: Cai Huoqing <caihuoqing@baidu.com>
To: <bskeggs@redhat.com>, <airlied@linux.ie>, <daniel@ffwll.ch>
Cc: <dri-devel@lists.freedesktop.org>,
<nouveau@lists.freedesktop.org>,
"Cai Huoqing" <caihuoqing@baidu.com>
Subject: [Nouveau] [PATCH] drm/nouveau: Make use of the helper macro SET_RUNTIME_PM_OPS()
Date: Sat, 28 Aug 2021 16:45:59 +0800 [thread overview]
Message-ID: <20210828084559.1510-1-caihuoqing@baidu.com> (raw)
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/nouveau/nouveau_drm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 1f828c9f691c..ba81645b4f2a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1258,15 +1258,14 @@ static void nouveau_display_options(void)
}
static const struct dev_pm_ops nouveau_pm_ops = {
+ SET_RUNTIME_PM_OPS(nouveau_pmops_runtime_suspend,
+ nouveau_pmops_runtime_resume, nouveau_pmops_runtime_idle)
.suspend = nouveau_pmops_suspend,
.resume = nouveau_pmops_resume,
.freeze = nouveau_pmops_freeze,
.thaw = nouveau_pmops_thaw,
.poweroff = nouveau_pmops_freeze,
.restore = nouveau_pmops_resume,
- .runtime_suspend = nouveau_pmops_runtime_suspend,
- .runtime_resume = nouveau_pmops_runtime_resume,
- .runtime_idle = nouveau_pmops_runtime_idle,
};
static struct pci_driver
--
2.25.1
reply other threads:[~2021-08-28 9:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210828084559.1510-1-caihuoqing@baidu.com \
--to=caihuoqing@baidu.com \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=nouveau@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).