aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index d7a5fcf9ef0f..6bff83b1f298 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -572,16 +572,26 @@ static inline void arch_reserve_mem_area(acpi_physical_address addr,
572#define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0) 572#define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
573#endif 573#endif
574 574
575#if defined(CONFIG_ACPI) && defined(CONFIG_PM_RUNTIME) 575#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
576int acpi_dev_runtime_suspend(struct device *dev); 576int acpi_dev_runtime_suspend(struct device *dev);
577int acpi_dev_runtime_resume(struct device *dev); 577int acpi_dev_runtime_resume(struct device *dev);
578int acpi_subsys_runtime_suspend(struct device *dev); 578int acpi_subsys_runtime_suspend(struct device *dev);
579int acpi_subsys_runtime_resume(struct device *dev); 579int acpi_subsys_runtime_resume(struct device *dev);
580struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
581int acpi_dev_pm_attach(struct device *dev, bool power_on);
580#else 582#else
581static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; } 583static inline int acpi_dev_runtime_suspend(struct device *dev) { return 0; }
582static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; } 584static inline int acpi_dev_runtime_resume(struct device *dev) { return 0; }
583static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } 585static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; }
584static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } 586static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; }
587static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
588{
589 return NULL;
590}
591static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
592{
593 return -ENODEV;
594}
585#endif 595#endif
586 596
587#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP) 597#if defined(CONFIG_ACPI) && defined(CONFIG_PM_SLEEP)
@@ -604,20 +614,6 @@ static inline int acpi_subsys_suspend(struct device *dev) { return 0; }
604static inline int acpi_subsys_freeze(struct device *dev) { return 0; } 614static inline int acpi_subsys_freeze(struct device *dev) { return 0; }
605#endif 615#endif
606 616
607#if defined(CONFIG_ACPI) && defined(CONFIG_PM)
608struct acpi_device *acpi_dev_pm_get_node(struct device *dev);
609int acpi_dev_pm_attach(struct device *dev, bool power_on);
610#else
611static inline struct acpi_device *acpi_dev_pm_get_node(struct device *dev)
612{
613 return NULL;
614}
615static inline int acpi_dev_pm_attach(struct device *dev, bool power_on)
616{
617 return -ENODEV;
618}
619#endif
620
621#ifdef CONFIG_ACPI 617#ifdef CONFIG_ACPI
622__printf(3, 4) 618__printf(3, 4)
623void acpi_handle_printk(const char *level, acpi_handle handle, 619void acpi_handle_printk(const char *level, acpi_handle handle,