aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-11-27 16:38:23 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-03 18:50:19 -0500
commit5de21bb998b8e816e6a1df1f2c04d95fb6e27a5d (patch)
tree836c77264fd2f659d6c32572b8c5ae4629152c84 /include
parent4bea2b4cd93600e4c3aed6059a095209d3fc91b9 (diff)
ACPI / PM: Drop CONFIG_PM_RUNTIME from the ACPI core
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 depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM in the ACPI core code. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_bus.h6
-rw-r--r--include/linux/acpi.h26
2 files changed, 12 insertions, 20 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index f34a0835aa4f..78f7521417e3 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -516,6 +516,7 @@ acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev,
516 void (*work_func)(struct work_struct *work)); 516 void (*work_func)(struct work_struct *work));
517acpi_status acpi_remove_pm_notifier(struct acpi_device *adev); 517acpi_status acpi_remove_pm_notifier(struct acpi_device *adev);
518int acpi_pm_device_sleep_state(struct device *, int *, int); 518int acpi_pm_device_sleep_state(struct device *, int *, int);
519int acpi_pm_device_run_wake(struct device *, bool);
519#else 520#else
520static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev, 521static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev,
521 struct device *dev, 522 struct device *dev,
@@ -535,11 +536,6 @@ static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m)
535 return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3_COLD) ? 536 return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3_COLD) ?
536 m : ACPI_STATE_D0; 537 m : ACPI_STATE_D0;
537} 538}
538#endif
539
540#ifdef CONFIG_PM_RUNTIME
541int acpi_pm_device_run_wake(struct device *, bool);
542#else
543static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) 539static inline int acpi_pm_device_run_wake(struct device *dev, bool enable)
544{ 540{
545 return -ENODEV; 541 return -ENODEV;
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 407a12f663eb..77329be250b2 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -553,16 +553,26 @@ static inline void arch_reserve_mem_area(acpi_physical_address addr,
553#define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0) 553#define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
554#endif 554#endif
555 555
556#if defined(CONFIG_ACPI) && defined(CONFIG_PM_RUNTIME) 556#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
557int acpi_dev_runtime_suspend(struct device *dev); 557int acpi_dev_runtime_suspend(struct device *dev);
558int acpi_dev_runtime_resume(struct device *dev); 558int acpi_dev_runtime_resume(struct device *dev);
559int acpi_subsys_runtime_suspend(struct device *dev); 559int acpi_subsys_runtime_suspend(struct device *dev);
560int acpi_subsys_runtime_resume(struct device *dev); 560int acpi_subsys_runtime_resume(struct device *dev);
561struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
562int acpi_dev_pm_attach(struct device *dev, bool power_on);
561#else 563#else
562static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; } 564static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; }
563static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; } 565static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; }
564static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } 566static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
565static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } 567static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
568static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
569{
570 return NULL;
571}
572static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
573{
574 return -ENODEV;
575}
566#endif 576#endif
567 577
568#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP) 578#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
@@ -585,20 +595,6 @@ static inline int acpi_subsys_suspend(struct device *dev) { return 0; }
585static inline int acpi_subsys_freeze(struct device *dev) { return 0; } 595static inline int acpi_subsys_freeze(struct device *dev) { return 0; }
586#endif 596#endif
587 597
588#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
589struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
590int acpi_dev_pm_attach(struct device *dev, bool power_on);
591#else
592static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
593{
594 return NULL;
595}
596static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
597{
598 return -ENODEV;
599}
600#endif
601
602#ifdef CONFIG_ACPI 598#ifdef CONFIG_ACPI
603__printf(3, 4) 599__printf(3, 4)
604void acpi_handle_printk(const char *level, acpi_handle handle, 600void acpi_handle_printk(const char *level, acpi_handle handle,