From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 646D8C432BE for ; Sat, 28 Aug 2021 09:33:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AAA1760EB0 for ; Sat, 28 Aug 2021 09:33:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AAA1760EB0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baidu.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A95D6EA2B; Sat, 28 Aug 2021 09:33:11 +0000 (UTC) X-Greylist: delayed 1860 seconds by postgrey-1.36 at gabe; Sat, 28 Aug 2021 09:33:09 UTC Received: from baidu.com (mx21.baidu.com [220.181.3.85]) by gabe.freedesktop.org (Postfix) with ESMTP id 21A8F6EA2B for ; Sat, 28 Aug 2021 09:33:09 +0000 (UTC) Received: from BJHW-Mail-Ex15.internal.baidu.com (unknown [10.127.64.38]) by Forcepoint Email with ESMTPS id AA750D0E582ED5DFDEEB; Sat, 28 Aug 2021 16:46:13 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex15.internal.baidu.com (10.127.64.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Sat, 28 Aug 2021 16:46:13 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.62.20) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Sat, 28 Aug 2021 16:46:12 +0800 From: Cai Huoqing To: , , CC: , , "Cai Huoqing" Date: Sat, 28 Aug 2021 16:45:59 +0800 Message-ID: <20210828084559.1510-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.32.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.31.62.20] X-ClientProxiedBy: BC-Mail-Ex17.internal.baidu.com (172.31.51.11) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex15_2021-08-28 16:46:13:656 Subject: [Nouveau] [PATCH] drm/nouveau: Make use of the helper macro SET_RUNTIME_PM_OPS() X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" 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 --- 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