Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2018928pxb; Sat, 28 Aug 2021 01:58:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAGvscvkDcRfX/n91rVnwFP/e9sRTFcZDwktZrohx1t45hhI4kxIkhom3I/BnNILnwJ9Mv X-Received: by 2002:a02:cacd:: with SMTP id f13mr6257955jap.94.1630141081105; Sat, 28 Aug 2021 01:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630141081; cv=none; d=google.com; s=arc-20160816; b=qEffdzSOqYxRIAmSekGrWYGnuWU7WvwsdBOWvB7T7a3VSB0vKi9yLM1wB0yFO4zIAO W/lw0/0IK2xTNeqtTBXS+kdxFRRZt7i+Ec2f4u/d8HeOuSKTj2GlZj1tL2NJLS4Xyyqq gFDUim+G6RBRFHA9vqEcJxdT9CnGyQwbXYLl2h4tfq9eBIapvtk3/ufIu1uDMbiBRF4o rCbIYYw8tQv7UDLi9POTbv5RlsRjgCFvTRAN6B/nBtf6WiETlnz5tL1NEKLAoxLUqLUx nhjFzF0UHhre+yZt1zARDdWOLMPdevCOtVFCqqMJhSdm+5uxk1CO+i6Nmx9KspG9H7ae A1Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yN7dVwRe108/27K3fB1MnKoMlqhVvL4frVm0vMIkhFQ=; b=lwh/HogPu3xsPXe7funceeHSRodUOTfXahzw0nmFKnBWUpsE0Zn4fEPzOT3xbtyfsl MubB3+NE6nNXq3nBikIoduIRV0Vn9EO0vcib+k8kRgHr1LTm1QGu/s8D1ZX5u2WGIx97 YK+QG1LyR9Lhx+KPdVo79DOpHVbDgi/a97vVDEG7D2HwosyGLhWvsnSCt3QBQQztQOH8 B/4f928wroj7JLNoVvbiKExHy65dBwjIHxG1ZjHWtw5P7r7kwWU8UlyQCGEKmPyrzYC+ R51MH94wbMn26TVoW36UgybBnT/bpO9yke7Ms6aH2paDejvB8zNMOROTPndEWm6WfA1Q D9tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b60si9393747jai.29.2021.08.28.01.57.46; Sat, 28 Aug 2021 01:58:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233593AbhH1I5u (ORCPT + 99 others); Sat, 28 Aug 2021 04:57:50 -0400 Received: from mx21.baidu.com ([220.181.3.85]:52584 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233446AbhH1I5s (ORCPT ); Sat, 28 Aug 2021 04:57:48 -0400 Received: from BC-Mail-Ex07.internal.baidu.com (unknown [172.31.51.47]) by Forcepoint Email with ESMTPS id 6B1FFA6BB270BB89359D; Sat, 28 Aug 2021 16:56:56 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX07.internal.baidu.com (172.31.51.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Sat, 28 Aug 2021 16:56:56 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.62.18) 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:56:55 +0800 From: Cai Huoqing To: CC: , , Cai Huoqing Subject: [PATCH] PCI: Make use of the helper macro SET_RUNTIME_PM_OPS() Date: Sat, 28 Aug 2021 16:56:42 +0800 Message-ID: <20210828085642.559-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.32.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.31.62.18] X-ClientProxiedBy: BC-Mail-Ex18.internal.baidu.com (172.31.51.12) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/pci/pci-driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index a0615395500a..deddd0e28e6c 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -1330,6 +1330,7 @@ static int pci_pm_runtime_idle(struct device *dev) } static const struct dev_pm_ops pci_dev_pm_ops = { + SET_RUNTIME_PM_OPS(pci_pm_runtime_suspend, pci_pm_runtime_resume, pci_pm_runtime_idle) .prepare = pci_pm_prepare, .complete = pci_pm_complete, .suspend = pci_pm_suspend, @@ -1347,9 +1348,6 @@ static const struct dev_pm_ops pci_dev_pm_ops = { .thaw_noirq = pci_pm_thaw_noirq, .poweroff_noirq = pci_pm_poweroff_noirq, .restore_noirq = pci_pm_restore_noirq, - .runtime_suspend = pci_pm_runtime_suspend, - .runtime_resume = pci_pm_runtime_resume, - .runtime_idle = pci_pm_runtime_idle, }; #define PCI_PM_OPS_PTR (&pci_dev_pm_ops) -- 2.25.1