From patchwork Wed Sep 13 07:40:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 138768 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp1037251vqx; Wed, 13 Sep 2023 05:09:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5yV0QXJlRFVLs8VgxZzQm9dDW+nY/C2E0RYbi7/IB3PQBnKlyaDA/ORC9Vji78jH61ja+ X-Received: by 2002:a05:6a20:5614:b0:13b:a2c9:922e with SMTP id ir20-20020a056a20561400b0013ba2c9922emr1792262pzc.27.1694606998455; Wed, 13 Sep 2023 05:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694606998; cv=none; d=google.com; s=arc-20160816; b=hBgQFl3e8nkZ8m3i+c1txN8D5DEgBggZeCJyod8PwUWXgfL867IlIOuEuMrENooP5v 5uQiSI9pVpxnrJGTHhgM9BwCk8hzJpmI6IcNjq4zNUVKSAtawtIpvv8tUF5NsREAdL5G ZtIe5tBLLTku5ToZ0rMmeU76+5w8jJ+Ffy58lQ4BmSDCp4OJog3MUzF2cE4UxycSO29K r/F52BHJcrqzlMBEKP0CRvWQqI0LSKQ0nsoQsyQyR49TpMZd+tAqthMDycAaKalyxlBR b7Yep/xUL0ahWSgz3m/zhsKFajBjwSu7hU9F3a6dPzz/h5kooAO4nzpKWz3aDBHrf+Vg +8kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Th4DvzbfnmH+ltfmsNmklizJmQ0JNO42NP2pqntzDhA=; fh=5Kz5SMTbxRzacFposuKshVXqDrm6Bf8nQGi1HiJfgj8=; b=0eT0JSDtpnJx8eVKV67zj9/jCJ8529GK4iMEU5zejrCf225CmoiCeP8lcykUProO4S rhrWUtb0kCK+Qsq18FEtV0uKy4Uwg2Mo5o+JABz1sBpkx1qggC6ZwzsxOfblp1ECfqUp fNp8FCdYRBjcgJB6oCXUPnlXdkK3sXcKrZ3x/SOrws0FfMazrJIsfBl9sfGDHKp/0YKm afgr4tDPVxmVDnNok0bEQERco1p4gpCCfZAwofyQaJvsKhN8HWmdPHDcN2bVZOWJM5kz hUFYXEUk0zhgWSAsfa2nCMt+v9DFtbeZ9k5S8Rv0z0RXIgCZkT+fuqwjw5s9rxquRURq JCEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ejmxYs+G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id fb35-20020a056a002da300b0068a5acb2719si10157213pfb.199.2023.09.13.05.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 05:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ejmxYs+G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 151B3827AF96; Wed, 13 Sep 2023 00:42:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238624AbjIMHlx (ORCPT + 35 others); Wed, 13 Sep 2023 03:41:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233816AbjIMHlv (ORCPT ); Wed, 13 Sep 2023 03:41:51 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDE4B1729; Wed, 13 Sep 2023 00:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694590907; x=1726126907; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=t2NP+b+20XyODzklEgy6Nzs7Ja68QzhRWvysWYPgX50=; b=ejmxYs+GDHjni8vHA8D/3chSYbFXBfntJCKDP1bxSRlNqkz0X3aohM74 qDutBlNQzQkhqxnv3e8dLvUVhMBz3SHr7rvqTwfJh8z8gwQY0vpiQYtdv 2j5Ss1BOYu6+6j/jqiXNCXFrJJn2JMbcW4rOKyk49bYSkcxnDCsGP+50b KX5vd+cURJZDJqCT9fHzKng8T7HFhpBOSFVb/jYD0F8pBVgur21/g9ki7 yuvuo5c84EYx7ys0NGINTdGWjgAzUGhlIawm7mOd5NLN5DUTD9DVhNo7X nwh16t9qcElGt/A+nk3LA3tCxplRsRexkqOslFTJG++oIJtyuXavFJ62s w==; X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="368859103" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="368859103" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 00:41:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="747208904" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="747208904" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmsmga007.fm.intel.com with ESMTP; 13 Sep 2023 00:41:44 -0700 From: Raag Jadav To: rafael.j.wysocki@intel.com, len.brown@intel.com, pavel@ucw.cz, Jonathan.Cameron@huawei.com, paul@crapouillou.net, andriy.shevchenko@linux.intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [RFC v1 1/2] PM: Introduce export macros for _SIMPLE_ variants of _PM_OPS() Date: Wed, 13 Sep 2023 13:10:31 +0530 Message-Id: <20230913074032.27927-2-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230913074032.27927-1-raag.jadav@intel.com> References: <20230913074032.27927-1-raag.jadav@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 13 Sep 2023 00:42:29 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776924227961890361 X-GMAIL-MSGID: 1776924227961890361 Introduce a new set of export macros for _SIMPLE_ variants of _PM_OPS(), which export dev_pm_ops symbol only in case CONFIG_PM_SLEEP=y and discard it otherwise. Fixes: 34e1ed189fab ("PM: Improve EXPORT_*_DEV_PM_OPS macros") Signed-off-by: Raag Jadav --- include/linux/pm.h | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index 1400c37b29c7..ae9b4f26d56a 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -374,24 +374,39 @@ const struct dev_pm_ops name = { \ RUNTIME_PM_OPS(runtime_suspend_fn, runtime_resume_fn, idle_fn) \ } -#ifdef CONFIG_PM -#define _EXPORT_DEV_PM_OPS(name, license, ns) \ +#define _EXPORT_PM_OPS(name, license, ns) \ const struct dev_pm_ops name; \ __EXPORT_SYMBOL(name, license, ns); \ const struct dev_pm_ops name -#define EXPORT_PM_FN_GPL(name) EXPORT_SYMBOL_GPL(name) -#define EXPORT_PM_FN_NS_GPL(name, ns) EXPORT_SYMBOL_NS_GPL(name, ns) -#else -#define _EXPORT_DEV_PM_OPS(name, license, ns) \ + +#define _PM_OPS(name, license, ns) \ static __maybe_unused const struct dev_pm_ops __static_##name + +#ifdef CONFIG_PM +#define _EXPORT_RUNTIME_PM_OPS(name, license, ns) _EXPORT_PM_OPS(name, license, ns) +#define EXPORT_PM_FN_GPL(name) EXPORT_SYMBOL_GPL(name) +#define EXPORT_PM_FN_NS_GPL(name, ns) EXPORT_SYMBOL_NS_GPL(name, ns) +#else +#define _EXPORT_RUNTIME_PM_OPS(name, license, ns) _PM_OPS(name, license, ns) #define EXPORT_PM_FN_GPL(name) #define EXPORT_PM_FN_NS_GPL(name, ns) #endif -#define EXPORT_DEV_PM_OPS(name) _EXPORT_DEV_PM_OPS(name, "", "") -#define EXPORT_GPL_DEV_PM_OPS(name) _EXPORT_DEV_PM_OPS(name, "GPL", "") -#define EXPORT_NS_DEV_PM_OPS(name, ns) _EXPORT_DEV_PM_OPS(name, "", #ns) -#define EXPORT_NS_GPL_DEV_PM_OPS(name, ns) _EXPORT_DEV_PM_OPS(name, "GPL", #ns) +#ifdef CONFIG_PM_SLEEP +#define _EXPORT_SIMPLE_PM_OPS(name, license, ns) _EXPORT_PM_OPS(name, license, ns) +#else +#define _EXPORT_SIMPLE_PM_OPS(name, license, ns) _PM_OPS(name, license, ns) +#endif + +#define EXPORT_DEV_PM_OPS(name) _EXPORT_RUNTIME_PM_OPS(name, "", "") +#define EXPORT_GPL_DEV_PM_OPS(name) _EXPORT_RUNTIME_PM_OPS(name, "GPL", "") +#define EXPORT_NS_DEV_PM_OPS(name, ns) _EXPORT_RUNTIME_PM_OPS(name, "", #ns) +#define EXPORT_NS_GPL_DEV_PM_OPS(name, ns) _EXPORT_RUNTIME_PM_OPS(name, "GPL", #ns) + +#define EXPORT_SIMPLE_PM_OPS(name) _EXPORT_SIMPLE_PM_OPS(name, "", "") +#define EXPORT_GPL_SIMPLE_PM_OPS(name) _EXPORT_SIMPLE_PM_OPS(name, "GPL", "") +#define EXPORT_NS_DEV_SIMPLE_OPS(name, ns) _EXPORT_SIMPLE_PM_OPS(name, "", #ns) +#define EXPORT_NS_GPL_SIMPLE_PM_OPS(name, ns) _EXPORT_SIMPLE_PM_OPS(name, "GPL", #ns) /* * Use this if you want to use the same suspend and resume callbacks for suspend @@ -404,19 +419,19 @@ const struct dev_pm_ops name = { \ _DEFINE_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL) #define EXPORT_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ - EXPORT_DEV_PM_OPS(name) = { \ + EXPORT_SIMPLE_PM_OPS(name) = { \ SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ } #define EXPORT_GPL_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ - EXPORT_GPL_DEV_PM_OPS(name) = { \ + EXPORT_GPL_SIMPLE_PM_OPS(name) = { \ SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ } #define EXPORT_NS_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn, ns) \ - EXPORT_NS_DEV_PM_OPS(name, ns) = { \ + EXPORT_NS_SIMPLE_PM_OPS(name, ns) = { \ SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ } #define EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn, ns) \ - EXPORT_NS_GPL_DEV_PM_OPS(name, ns) = { \ + EXPORT_NS_GPL_SIMPLE_PM_OPS(name, ns) = { \ SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ } From patchwork Wed Sep 13 07:40:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 138703 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp942557vqx; Wed, 13 Sep 2023 01:52:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6j+XK7Ag0MIK2ReLjVBhOjswVzXDs5PNIU+klT+k0ptb6BbeqL3RSu/jl141H2kIPG54h X-Received: by 2002:a17:903:244c:b0:1c3:2c4d:889e with SMTP id l12-20020a170903244c00b001c32c4d889emr7262261pls.16.1694595127691; Wed, 13 Sep 2023 01:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694595127; cv=none; d=google.com; s=arc-20160816; b=Ehnr5jR4u9BiTan42DbG5bhIrJL7iEsqGMsqfyMdM86Ax8g5DuRf4SsB5R6qjNDclk c6TSCUylIpSHhZ/RHSKjLNZooQTn5Fpjyt9t8ygEDXf/AVZbMNNJ9IOhvgkV9SInwRiB z4XhKZR+NojH08gXFUY1bwB5R9I2f27FMhZ1Lwj3Qr6hmlPSSP6Ab9J4UYRAVr7BCZM5 iB9/Rfbw4GR34KrNyrCyq/aWAoDcqP0L9B/R2ULmGnT/2zXAJdyAJeXHG9JWgr/PWbI7 /GI1sZaMV8b1IPfBnwLdLJxlBru7Uvhu2Q1UnQkaYhxKfghZRdLTyJxPgq3tZTVi97uF /fUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=AGfbOn29IHU29RQyAAS8k4aGzbZ7kPy/Qiy7Fz7J464=; fh=5Kz5SMTbxRzacFposuKshVXqDrm6Bf8nQGi1HiJfgj8=; b=wEvJ+vfhoDK8ikqu09/UcxnNVFYL8CoXBdXrMigEKP5/XAyXrnc8NDRSDX5nEyrg0S 2dAsQ639z2cYXl8GCmmjGhkUDJ7OPuqXLHP12ifXLiJbGvDKbFq39Dxz4icKF85noduU bZ8dFH8+aKuOpTLEBOKtZ+xPBTreOT9tgRzRUxqL5lGQRJrnEsCW2I9DojV4UyxVdXvH PXmjzhxCIHVK6GDboUTPyCAYqYsyDR8y06Z9OJMfi33PdRnWOL1Q28bAZglTPKeNJqhA Z3bC/ORSndwYBe3JmVxTdzFrjFKePnREYJe1d4Xnwg9hoMSV2JMZ7jfUN56DjejACpgR LQuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=icekDOCw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id jy5-20020a17090342c500b001bbbbb61c67si9315678plb.542.2023.09.13.01.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 01:52:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=icekDOCw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 319DB826E68F; Wed, 13 Sep 2023 00:42:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238636AbjIMHmB (ORCPT + 35 others); Wed, 13 Sep 2023 03:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238634AbjIMHmA (ORCPT ); Wed, 13 Sep 2023 03:42:00 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DA9C198A; Wed, 13 Sep 2023 00:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694590916; x=1726126916; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=YEdJDHGJGKROfULQ3CMNlWxFjjk89LxF/g8t9X9uSQs=; b=icekDOCw/avPzmbwsCWTvjE9sZSedS7WJtGwbXyDHfNKGgZOa18HrrbU qCxwAGNCfB+zwVoRaYKhTC5iiu57uJGq2pBiWfN1Lf/K+b6UvHyo//15j 0eikmUwhsZRuGCm3JgU2DcQG1yryUSFF5ikiG1XRPkj+SuHR+mofQzkEd FKr5P+TROVo8C+rWn9BWtux0uRXKPpVXClRqqYMlQJyxYDLUOUNAiD/DQ Lde/tWDXaoubgEmqE4ApXrKPT1N5az65I7a3UkOvEOKjIEkV701v1Spf8 dKqUsOMeIUHYM1xJK/JAg/6NV20DhJDQYMfPWrHVV1b0u0ViZFhyH5lda Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="368859139" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="368859139" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 00:41:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="747208937" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="747208937" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmsmga007.fm.intel.com with ESMTP; 13 Sep 2023 00:41:47 -0700 From: Raag Jadav To: rafael.j.wysocki@intel.com, len.brown@intel.com, pavel@ucw.cz, Jonathan.Cameron@huawei.com, paul@crapouillou.net, andriy.shevchenko@linux.intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [RFC v1 2/2] PM: Update EXPORT_*_DEV_PM_OPS() to EXPORT_*_RUNTIME_PM_OPS() Date: Wed, 13 Sep 2023 13:10:32 +0530 Message-Id: <20230913074032.27927-3-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230913074032.27927-1-raag.jadav@intel.com> References: <20230913074032.27927-1-raag.jadav@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Sep 2023 00:42:10 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776911780368878270 X-GMAIL-MSGID: 1776911780368878270 Rename EXPORT_*_DEV_PM_OPS() macros to EXPORT_*_RUNTIME_PM_OPS() and while at it, move them to pm_runtime.h. This is done in conjunction with the introduction of EXPORT_*_SIMPLE_PM_OPS() set of macros, to make things less confusing. This makes both _RUNTIME_ and _SIMPLE_ variants of export macros more distinguishable and self explanatory. Signed-off-by: Raag Jadav --- include/linux/pm.h | 5 ----- include/linux/pm_runtime.h | 13 +++++++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index ae9b4f26d56a..9c6c2322ae5f 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -398,11 +398,6 @@ const struct dev_pm_ops name = { \ #define _EXPORT_SIMPLE_PM_OPS(name, license, ns) _PM_OPS(name, license, ns) #endif -#define EXPORT_DEV_PM_OPS(name) _EXPORT_RUNTIME_PM_OPS(name, "", "") -#define EXPORT_GPL_DEV_PM_OPS(name) _EXPORT_RUNTIME_PM_OPS(name, "GPL", "") -#define EXPORT_NS_DEV_PM_OPS(name, ns) _EXPORT_RUNTIME_PM_OPS(name, "", #ns) -#define EXPORT_NS_GPL_DEV_PM_OPS(name, ns) _EXPORT_RUNTIME_PM_OPS(name, "GPL", #ns) - #define EXPORT_SIMPLE_PM_OPS(name) _EXPORT_SIMPLE_PM_OPS(name, "", "") #define EXPORT_GPL_SIMPLE_PM_OPS(name) _EXPORT_SIMPLE_PM_OPS(name, "GPL", "") #define EXPORT_NS_DEV_SIMPLE_OPS(name, ns) _EXPORT_SIMPLE_PM_OPS(name, "", #ns) diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 7c9b35448563..0b73b00bd59f 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -22,6 +22,11 @@ usage_count */ #define RPM_AUTO 0x08 /* Use autosuspend_delay */ +#define EXPORT_RUNTIME_PM_OPS(name) _EXPORT_RUNTIME_PM_OPS(name, "", "") +#define EXPORT_GPL_RUNTIME_PM_OPS(name) _EXPORT_RUNTIME_PM_OPS(name, "GPL", "") +#define EXPORT_NS_RUNTIME_PM_OPS(name, ns) _EXPORT_RUNTIME_PM_OPS(name, "", #ns) +#define EXPORT_NS_GPL_RUNTIME_PM_OPS(name, ns) _EXPORT_RUNTIME_PM_OPS(name, "GPL", #ns) + /* * Use this for defining a set of PM operations to be used in all situations * (system suspend, hibernation or runtime PM). @@ -40,19 +45,19 @@ resume_fn, idle_fn) #define EXPORT_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ - EXPORT_DEV_PM_OPS(name) = { \ + EXPORT_RUNTIME_PM_OPS(name) = { \ RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ } #define EXPORT_GPL_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn) \ - EXPORT_GPL_DEV_PM_OPS(name) = { \ + EXPORT_GPL_RUNTIME_PM_OPS(name) = { \ RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ } #define EXPORT_NS_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn, ns) \ - EXPORT_NS_DEV_PM_OPS(name, ns) = { \ + EXPORT_NS_RUNTIME_PM_OPS(name, ns) = { \ RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ } #define EXPORT_NS_GPL_RUNTIME_DEV_PM_OPS(name, suspend_fn, resume_fn, idle_fn, ns) \ - EXPORT_NS_GPL_DEV_PM_OPS(name, ns) = { \ + EXPORT_NS_GPL_RUNTIME_PM_OPS(name, ns) = { \ RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ }