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 3/4] ACPI / PM: Drop CONFIG_PM_RUNTIME from the ACPI core
Date: Thu, 27 Nov 2014 01:40:01 +0100 [thread overview]
Message-ID: <2305225.e81AdzJbgi@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/acpi/acpi_lpss.c | 4 +---
drivers/acpi/device_pm.c | 8 ++------
drivers/acpi/pci_irq.c | 2 +-
include/linux/acpi.h | 26 +++++++++++---------------
4 files changed, 15 insertions(+), 25 deletions(-)
Index: linux-pm/drivers/acpi/acpi_lpss.c
===================================================================
--- linux-pm.orig/drivers/acpi/acpi_lpss.c
+++ linux-pm/drivers/acpi/acpi_lpss.c
@@ -588,7 +588,6 @@ static int acpi_lpss_resume_early(struct
}
#endif /* CONFIG_PM_SLEEP */
-#ifdef CONFIG_PM_RUNTIME
static int acpi_lpss_runtime_suspend(struct device *dev)
{
struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
@@ -631,11 +630,11 @@ static int acpi_lpss_runtime_resume(stru
return pm_generic_runtime_resume(dev);
}
-#endif /* CONFIG_PM_RUNTIME */
#endif /* CONFIG_PM */
static struct dev_pm_domain acpi_lpss_pm_domain = {
.ops = {
+#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
.prepare = acpi_subsys_prepare,
.complete = acpi_subsys_complete,
@@ -647,7 +646,6 @@ static struct dev_pm_domain acpi_lpss_pm
.poweroff_late = acpi_lpss_suspend_late,
.restore_early = acpi_lpss_resume_early,
#endif
-#ifdef CONFIG_PM_RUNTIME
.runtime_suspend = acpi_lpss_runtime_suspend,
.runtime_resume = acpi_lpss_runtime_resume,
#endif
Index: linux-pm/drivers/acpi/pci_irq.c
===================================================================
--- linux-pm.orig/drivers/acpi/pci_irq.c
+++ linux-pm/drivers/acpi/pci_irq.c
@@ -484,7 +484,7 @@ void acpi_pci_irq_disable(struct pci_dev
/* Keep IOAPIC pin configuration when suspending */
if (dev->dev.power.is_prepared)
return;
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
if (dev->dev.power.runtime_status == RPM_SUSPENDING)
return;
#endif
Index: linux-pm/drivers/acpi/device_pm.c
===================================================================
--- linux-pm.orig/drivers/acpi/device_pm.c
+++ linux-pm/drivers/acpi/device_pm.c
@@ -692,7 +692,6 @@ static int acpi_device_wakeup(struct acp
return 0;
}
-#ifdef CONFIG_PM_RUNTIME
/**
* acpi_pm_device_run_wake - Enable/disable remote wakeup for given device.
* @dev: Device to enable/disable the platform to wake up.
@@ -714,7 +713,6 @@ int acpi_pm_device_run_wake(struct devic
return acpi_device_wakeup(adev, ACPI_STATE_S0, enable);
}
EXPORT_SYMBOL(acpi_pm_device_run_wake);
-#endif /* CONFIG_PM_RUNTIME */
#ifdef CONFIG_PM_SLEEP
/**
@@ -773,7 +771,6 @@ static int acpi_dev_pm_full_power(struct
acpi_device_set_power(adev, ACPI_STATE_D0) : 0;
}
-#ifdef CONFIG_PM_RUNTIME
/**
* acpi_dev_runtime_suspend - Put device into a low-power state using ACPI.
* @dev: Device to put into a low-power state.
@@ -855,7 +852,6 @@ int acpi_subsys_runtime_resume(struct de
return ret ? ret : pm_generic_runtime_resume(dev);
}
EXPORT_SYMBOL_GPL(acpi_subsys_runtime_resume);
-#endif /* CONFIG_PM_RUNTIME */
#ifdef CONFIG_PM_SLEEP
/**
@@ -1023,10 +1019,9 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
static struct dev_pm_domain acpi_general_pm_domain = {
.ops = {
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
.runtime_suspend = acpi_subsys_runtime_suspend,
.runtime_resume = acpi_subsys_runtime_resume,
-#endif
#ifdef CONFIG_PM_SLEEP
.prepare = acpi_subsys_prepare,
.complete = acpi_subsys_complete,
@@ -1038,6 +1033,7 @@ static struct dev_pm_domain acpi_general
.poweroff_late = acpi_subsys_suspend_late,
.restore_early = acpi_subsys_resume_early,
#endif
+#endif
},
};
Index: linux-pm/include/linux/acpi.h
===================================================================
--- linux-pm.orig/include/linux/acpi.h
+++ linux-pm/include/linux/acpi.h
@@ -567,16 +567,26 @@ static inline void arch_reserve_mem_area
#define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
#endif
-#if defined(CONFIG_ACPI) && defined(CONFIG_PM_RUNTIME)
+#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
int acpi_dev_runtime_suspend(struct device *dev);
int acpi_dev_runtime_resume(struct device *dev);
int acpi_subsys_runtime_suspend(struct device *dev);
int acpi_subsys_runtime_resume(struct device *dev);
+struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
+int acpi_dev_pm_attach(struct device *dev, bool power_on);
#else
static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; }
static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; }
static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
+static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
+{
+ return NULL;
+}
+static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
+{
+ return -ENODEV;
+}
#endif
#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
@@ -599,20 +609,6 @@ static inline int acpi_subsys_suspend(st
static inline int acpi_subsys_freeze(struct device *dev) { return 0; }
#endif
-#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
-struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
-int acpi_dev_pm_attach(struct device *dev, bool power_on);
-#else
-static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
-{
- return NULL;
-}
-static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
-{
- return -ENODEV;
-}
-#endif
-
#ifdef CONFIG_ACPI
__printf(3, 4)
void acpi_handle_printk(const char *level, acpi_handle handle,
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 ` Rafael J. Wysocki [this message]
2014-11-27 22:06 ` [Update][PATCH 3/4] ACPI / PM: Drop CONFIG_PM_RUNTIME from the ACPI core Rafael J. Wysocki
2014-11-27 0:40 ` [PATCH 4/4] PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core Rafael J. Wysocki
2014-11-27 22:41 ` [Update][PATCH " 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=2305225.e81AdzJbgi@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).