Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2022014pxb; Sat, 28 Aug 2021 02:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytK6d3VUZtcCTVUELBrFvhX0JNKiMQWy78oOSGSALANf4Tj7C20skP67n0hdE9lusuCUtu X-Received: by 2002:a02:8189:: with SMTP id n9mr11730245jag.107.1630141459652; Sat, 28 Aug 2021 02:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630141459; cv=none; d=google.com; s=arc-20160816; b=MjzCWY+vlq5ZsVVlJ4HzrRhPzq/UWqfTcrHrCibYXlwEMB4MkgBeRlpIkdaxKSeubk nMPaN7+HLflaG9pE7llAm4UIxe41ssQ4c8HIF6vRJ/Na8hrF4ae7FQYEa0e59cC0gscU 9cK6aE65g2W6n5X8Hjpl7Lln7JxIl9DvS5BqEB+E+H2laC6pGR5Bw41ghk4ozbhaveLj xHeFinpn/YA10HN27gHF0OUdyracNhVbnO8o72Niimm9o8jUs18/YAvEGp/UqEmCBAHR EqNec9L3p84AaTZStemkIbbtsQ/q8RTthAFCtPAg3FZxJGFvJfii+bvp4m3HM9aNBYLA MskQ== 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=P+9oAelU/jenOuv6ypWNoi9wU57yJ0VG9rLXzBXyRGI=; b=0IEtD0KXyZ4XoPUcTXv5cLM/rQeNREeaLinr8KPvy//Qf+UCUSGC1Kxk86drzcAWGY fEB/zjviXPpzpGoleksCciUko2ZAoy/3yA2pVqS14cqFAkXd7hd5dNO/dgAVZWD+dOpY 3rZhMtCenOUIW7lNS1Ed1WwXgsFFFGz2fDPqW4GInJlmES8C1A8h8K0XwB2/ItshpAf/ Rgf+1NJyU/kLWtnjsYySZ2olRR/cAdaL5FA2iwMffLjx2XSXLZ74zKZJKOThTlPjd7mw HjTKHPtq6eOVnE0++tIQFJFgUPr5XBkunO02BAi+I3jXv10qy2Cj5L0X0g2nSDayYzQH 4tVw== 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 y5si8079084ion.91.2021.08.28.02.04.02; Sat, 28 Aug 2021 02:04:19 -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 S233632AbhH1JDf (ORCPT + 99 others); Sat, 28 Aug 2021 05:03:35 -0400 Received: from mx20.baidu.com ([111.202.115.85]:58942 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233446AbhH1JDe (ORCPT ); Sat, 28 Aug 2021 05:03:34 -0400 Received: from BC-Mail-Ex29.internal.baidu.com (unknown [172.31.51.23]) by Forcepoint Email with ESMTPS id ECCCDDC310992669262B; Sat, 28 Aug 2021 17:02:42 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex29.internal.baidu.com (172.31.51.23) 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 17:02:42 +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 17:02:42 +0800 From: Cai Huoqing To: , CC: , Cai Huoqing Subject: [PATCH] driver core: platform: Make use of the helper macro SET_RUNTIME_PM_OPS() Date: Sat, 28 Aug 2021 17:02:19 +0800 Message-ID: <20210828090219.1177-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-Ex11.internal.baidu.com (172.31.51.51) 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", 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/base/platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 652531f67135..598acf93a360 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -1466,8 +1466,7 @@ int platform_dma_configure(struct device *dev) } static const struct dev_pm_ops platform_dev_pm_ops = { - .runtime_suspend = pm_generic_runtime_suspend, - .runtime_resume = pm_generic_runtime_resume, + SET_RUNTIME_PM_OPS(pm_generic_runtime_suspend, pm_generic_runtime_resume, NULL) USE_PLATFORM_PM_SLEEP_OPS }; -- 2.25.1