diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-10-26 07:40:04 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:15:16 -0500 |
commit | bdda27fb98463244f056852f800bbce7db67dc4a (patch) | |
tree | 2f9199944d42fa6f6b6aa2604a961ec4ac168147 /drivers/acpi/sleep.c | |
parent | dea553e3fc63c5e53a3f8741f0c9f840660cf06e (diff) |
ACPI / PM: Fix device PM kernedoc comments and #ifdefs
The kerneldoc comments for acpi_pm_device_sleep_state(),
acpi_pm_device_run_wake(), and acpi_pm_device_sleep_wake() are
outdated or otherwise inaccurate and/or don't follow the common
kerneldoc patterns, so fix them.
Additionally, notice that acpi_pm_device_run_wake() should be under
CONFIG_PM_RUNTIME rather than under CONFIG_PM_SLEEP, so fix that too.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 69134653909c..4defa0297ee4 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -684,28 +684,21 @@ int acpi_suspend(u32 acpi_state) | |||
684 | 684 | ||
685 | #ifdef CONFIG_PM | 685 | #ifdef CONFIG_PM |
686 | /** | 686 | /** |
687 | * acpi_pm_device_sleep_state - return preferred power state of ACPI device | 687 | * acpi_pm_device_sleep_state - Get preferred power state of ACPI device. |
688 | * in the system sleep state given by %acpi_target_sleep_state | 688 | * @dev: Device whose preferred target power state to return. |
689 | * @dev: device to examine; its driver model wakeup flags control | 689 | * @d_min_p: Location to store the upper limit of the allowed states range. |
690 | * whether it should be able to wake up the system | 690 | * @d_max_in: Deepest low-power state to take into consideration. |
691 | * @d_min_p: used to store the upper limit of allowed states range | 691 | * Return value: Preferred power state of the device on success, -ENODEV |
692 | * @d_max_in: specify the lowest allowed states | 692 | * (if there's no 'struct acpi_device' for @dev) or -EINVAL on failure |
693 | * Return value: preferred power state of the device on success, -ENODEV | ||
694 | * (ie. if there's no 'struct acpi_device' for @dev) or -EINVAL on failure | ||
695 | * | 693 | * |
696 | * Find the lowest power (highest number) ACPI device power state that | 694 | * Find the lowest power (highest number) ACPI device power state that the |
697 | * device @dev can be in while the system is in the sleep state represented | 695 | * device can be in while the system is in the sleep state represented |
698 | * by %acpi_target_sleep_state. If @wake is nonzero, the device should be | 696 | * by %acpi_target_sleep_state. If @d_min_p is set, the highest power (lowest |
699 | * able to wake up the system from this sleep state. If @d_min_p is set, | 697 | * number) device power state that @dev can be in for the given system sleep |
700 | * the highest power (lowest number) device power state of @dev allowed | 698 | * state is stored at the location pointed to by it. |
701 | * in this system sleep state is stored at the location pointed to by it. | ||
702 | * | 699 | * |
703 | * The caller must ensure that @dev is valid before using this function. | 700 | * The caller must ensure that @dev is valid before using this function. |
704 | * The caller is also responsible for figuring out if the device is | ||
705 | * supposed to be able to wake up the system and passing this information | ||
706 | * via @wake. | ||
707 | */ | 701 | */ |
708 | |||
709 | int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in) | 702 | int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in) |
710 | { | 703 | { |
711 | acpi_handle handle = DEVICE_ACPI_HANDLE(dev); | 704 | acpi_handle handle = DEVICE_ACPI_HANDLE(dev); |
@@ -797,14 +790,15 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p, int d_max_in) | |||
797 | EXPORT_SYMBOL(acpi_pm_device_sleep_state); | 790 | EXPORT_SYMBOL(acpi_pm_device_sleep_state); |
798 | #endif /* CONFIG_PM */ | 791 | #endif /* CONFIG_PM */ |
799 | 792 | ||
800 | #ifdef CONFIG_PM_SLEEP | 793 | #ifdef CONFIG_PM_RUNTIME |
801 | /** | 794 | /** |
802 | * acpi_pm_device_run_wake - Enable/disable wake-up for given device. | 795 | * acpi_pm_device_run_wake - Enable/disable remote wakeup for given device. |
803 | * @phys_dev: Device to enable/disable the platform to wake-up the system for. | 796 | * @phys_dev: Device to enable/disable the platform to wake up. |
804 | * @enable: Whether enable or disable the wake-up functionality. | 797 | * @enable: Whether to enable or disable the wakeup functionality. |
805 | * | 798 | * |
806 | * Find the ACPI device object corresponding to @pci_dev and try to | 799 | * Find the ACPI device object corresponding to @phys_dev and try to |
807 | * enable/disable the GPE associated with it. | 800 | * enable/disable the GPE associated with it, so that it can generate |
801 | * wakeup signals for the device in response to external (remote) events. | ||
808 | */ | 802 | */ |
809 | int acpi_pm_device_run_wake(struct device *phys_dev, bool enable) | 803 | int acpi_pm_device_run_wake(struct device *phys_dev, bool enable) |
810 | { | 804 | { |
@@ -832,12 +826,13 @@ int acpi_pm_device_run_wake(struct device *phys_dev, bool enable) | |||
832 | return 0; | 826 | return 0; |
833 | } | 827 | } |
834 | EXPORT_SYMBOL(acpi_pm_device_run_wake); | 828 | EXPORT_SYMBOL(acpi_pm_device_run_wake); |
829 | #endif /* CONFIG_PM_RUNTIME */ | ||
835 | 830 | ||
831 | #ifdef CONFIG_PM_SLEEP | ||
836 | /** | 832 | /** |
837 | * acpi_pm_device_sleep_wake - enable or disable the system wake-up | 833 | * acpi_pm_device_sleep_wake - Enable or disable device to wake up the system. |
838 | * capability of given device | 834 | * @dev: Device to enable/desible to wake up the system from sleep states. |
839 | * @dev: device to handle | 835 | * @enable: Whether to enable or disable @dev to wake up the system. |
840 | * @enable: 'true' - enable, 'false' - disable the wake-up capability | ||
841 | */ | 836 | */ |
842 | int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | 837 | int acpi_pm_device_sleep_wake(struct device *dev, bool enable) |
843 | { | 838 | { |