From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM list <linux-pm@vger.kernel.org>
Cc: Linux PCI <linux-pci@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Bjorn Helgaas <bhelgaas@google.com>,
Kevin Hilman <khilman@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 4/4] PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core
Date: Thu, 27 Nov 2014 01:40:53 +0100 [thread overview]
Message-ID: <2582138.zUe2QZynBg@vostro.rjw.lan> (raw)
In-Reply-To: <37310416.jZXoh5nfSC@vostro.rjw.lan>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so quite a few
#ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to
depend on CONFIG_PM.
Replace CONFIG_PM_RUNTIME with CONFIG_PM in the ACPI core code.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/pci/pci-driver.c | 20 +++++++-------------
drivers/pci/pci-sysfs.c | 4 ++--
drivers/pci/pcie/Kconfig | 2 +-
3 files changed, 10 insertions(+), 16 deletions(-)
Index: linux-pm/drivers/pci/pcie/Kconfig
===================================================================
--- linux-pm.orig/drivers/pci/pcie/Kconfig
+++ linux-pm/drivers/pci/pcie/Kconfig
@@ -79,4 +79,4 @@ endchoice
config PCIE_PME
def_bool y
- depends on PCIEPORTBUS && PM_RUNTIME
+ depends on PCIEPORTBUS && PM
Index: linux-pm/drivers/pci/pci-driver.c
===================================================================
--- linux-pm.orig/drivers/pci/pci-driver.c
+++ linux-pm/drivers/pci/pci-driver.c
@@ -1104,7 +1104,7 @@ static int pci_pm_restore(struct device
#endif /* !CONFIG_HIBERNATE_CALLBACKS */
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
static int pci_pm_runtime_suspend(struct device *dev)
{
@@ -1200,16 +1200,6 @@ static int pci_pm_runtime_idle(struct de
return ret;
}
-#else /* !CONFIG_PM_RUNTIME */
-
-#define pci_pm_runtime_suspend NULL
-#define pci_pm_runtime_resume NULL
-#define pci_pm_runtime_idle NULL
-
-#endif /* !CONFIG_PM_RUNTIME */
-
-#ifdef CONFIG_PM
-
static const struct dev_pm_ops pci_dev_pm_ops = {
.prepare = pci_pm_prepare,
.suspend = pci_pm_suspend,
@@ -1231,11 +1221,15 @@ static const struct dev_pm_ops pci_dev_p
#define PCI_PM_OPS_PTR (&pci_dev_pm_ops)
-#else /* !COMFIG_PM_OPS */
+#else /* !CONFIG_PM */
+
+#define pci_pm_runtime_suspend NULL
+#define pci_pm_runtime_resume NULL
+#define pci_pm_runtime_idle NULL
#define PCI_PM_OPS_PTR NULL
-#endif /* !COMFIG_PM_OPS */
+#endif /* !CONFIG_PM */
/**
* __pci_register_driver - register a new pci driver
Index: linux-pm/drivers/pci/pci-sysfs.c
===================================================================
--- linux-pm.orig/drivers/pci/pci-sysfs.c
+++ linux-pm/drivers/pci/pci-sysfs.c
@@ -385,7 +385,7 @@ static ssize_t dev_bus_rescan_store(stru
}
static DEVICE_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store);
-#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
+#if defined(CONFIG_PM) && defined(CONFIG_ACPI)
static ssize_t d3cold_allowed_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
@@ -566,7 +566,7 @@ static struct attribute *pci_dev_attrs[]
&dev_attr_enable.attr,
&dev_attr_broken_parity_status.attr,
&dev_attr_msi_bus.attr,
-#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
+#if defined(CONFIG_PM) && defined(CONFIG_ACPI)
&dev_attr_d3cold_allowed.attr,
#endif
#ifdef CONFIG_OF
next prev parent reply other threads:[~2014-11-27 0:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-27 0:37 [PATCH 0/4] PM: Use CONFIG_PM instead of CONFIG_PM_RUNTIME in core code Rafael J. Wysocki
2014-11-27 0:38 ` [PATCH 1/4] PM: Drop the SET_PM_RUNTIME_PM_OPS() macro Rafael J. Wysocki
2014-11-27 22:05 ` [Replacement][PATCH 1/4] PM: Merge the SET*_RUNTIME_PM_OPS() macros Rafael J. Wysocki
2014-11-29 0:52 ` Rafael J. Wysocki
2014-12-03 14:15 ` [PATCH 1/4] PM: Drop the SET_PM_RUNTIME_PM_OPS() macro Ulf Hansson
2014-12-03 22:51 ` Rafael J. Wysocki
2014-12-04 10:04 ` Ulf Hansson
2014-12-04 21:48 ` Rafael J. Wysocki
2014-11-27 0:39 ` [PATCH 2/4] PM: Drop CONFIG_PM_RUNTIME from the driver core Rafael J. Wysocki
2014-11-27 0:40 ` [PATCH 3/4] ACPI / PM: Drop CONFIG_PM_RUNTIME from the ACPI core Rafael J. Wysocki
2014-11-27 22:06 ` [Update][PATCH " Rafael J. Wysocki
2014-11-27 0:40 ` Rafael J. Wysocki [this message]
2014-11-27 22:41 ` [Update][PATCH 4/4] PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core Rafael J. Wysocki
2014-12-01 22:51 ` Bjorn Helgaas
2014-11-27 8:57 ` [PATCH 0/4] PM: Use CONFIG_PM instead of CONFIG_PM_RUNTIME in core code Ulf Hansson
2014-11-27 9:20 ` Ulf Hansson
2014-11-27 16:52 ` Rafael J. Wysocki
2014-11-27 17:00 ` Geert Uytterhoeven
2014-11-27 17:18 ` Alan Stern
2014-11-27 21:35 ` Rafael J. Wysocki
2014-11-27 22:34 ` Ulf Hansson
2014-11-29 0:50 ` Rafael J. Wysocki
2014-12-02 1:01 ` Kevin Hilman
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=2582138.zUe2QZynBg@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=bhelgaas@google.com \
--cc=geert@linux-m68k.org \
--cc=khilman@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=ulf.hansson@linaro.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).