summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'pm-doc'Rafael J. Wysocki2012-07-191-4/+5
|\ | | | | | | | | * pm-doc: PM / Documentation: fix typos in power management description
| * PM / Documentation: fix typos in power management descriptionOskar Schirmer2012-07-031-4/+5
| | | | | | | | | | | | | | Just two missing characters. Signed-off-by: Oskar Schirmer <oskar@scara.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* | Merge branch 'pm-drivers'Rafael J. Wysocki2012-07-1918-150/+104
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pm-drivers: rtc-cmos: report wakeups from interrupt handler PM / crypto / ux500: Use struct dev_pm_ops for power management PM / IPMI: Remove empty legacy PCI PM callbacks tpm_nsc: Use struct dev_pm_ops for power management tpm_tis: Use struct dev_pm_ops for power management tpm_atmel: Use struct dev_pm_ops for power management PM / TPM: Drop unused pm_message_t argument from tpm_pm_suspend() omap-rng: Use struct dev_pm_ops for power management mg_disk: Use struct dev_pm_ops for power management msi-laptop: Use struct dev_pm_ops for power management hdaps: Use struct dev_pm_ops for power management sonypi: Use struct dev_pm_ops for power management intel_mid_thermal: Use struct dev_pm_ops for power management acer-wmi: Use struct dev_pm_ops for power management intel_ips: Remove empty legacy PM callbacks thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routines thinkpad_acpi: Drop pm_message_t arguments from suspend routines
| * | rtc-cmos: report wakeups from interrupt handlerPaul Fox2012-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When suspending the system with an important RTC wake alarm active, it is possible that the RTC alarm will expire before the system has gone to sleep (e.g. short alarm timer, or an unusually long suspend routine). If this happens, the RTC alarm should trigger a wakeup event, possibly aborting system suspend. This condition can be detected in the form of an RTC alarm interrupt. Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | PM / crypto / ux500: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-102-38/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the ux500 crypto driver define its PM callbacks through struct dev_pm_ops objects rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Linus Walleij <linus.walleij@linaro.org>
| * | PM / IPMI: Remove empty legacy PCI PM callbacksRafael J. Wysocki2012-07-101-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | The legacy PM callbacks provided by the IPMI PCI driver are empty routines returning 0, so they can be safely dropped. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Corey Minyard <cminyard@mvista.com>
| * | tpm_nsc: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-101-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the tpm_nsc driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. This allows the driver to use tpm_pm_suspend() and tpm_pm_resume() as its PM callbacks directly, without defining its own PM callback routines. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | tpm_tis: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-101-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the tpm_tis driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. This allows the driver to use tpm_pm_suspend() as its suspend callback directly, without defining its own suspend callback routine. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | tpm_atmel: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-101-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the tpm_atmel driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. This allows the driver to use tpm_pm_suspend() and tpm_pm_resume() as its PM callbacks directly, without defining its own PM callback routines. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | PM / TPM: Drop unused pm_message_t argument from tpm_pm_suspend()Rafael J. Wysocki2012-07-105-6/+6
| | | | | | | | | | | | | | | | | | | | | The tpm_pm_suspend()'s second argument of type pm_message_t is not used, so remove it. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | omap-rng: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-101-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Make the omap-rng driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | mg_disk: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-061-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Make the mg_disk driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | msi-laptop: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the msi-laptop driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Lee, Chun-Yi <jlee@suse.com>
| * | hdaps: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Make the HDAPS driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | sonypi: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the sonypi driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Mattia Dongili <malattia@linux.it>
| * | intel_mid_thermal: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the intel_mid_thermal driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Durgadoss R <durgadoss.r@intel.com>
| * | acer-wmi: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the acer-wmi driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Tested-by: Lee, Chun-Yi <jlee@suse.com> Acked-by: Matthew Garrett <mjg@redhat.com>
| * | intel_ips: Remove empty legacy PM callbacksRafael J. Wysocki2012-07-011-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | The legacy PM callbacks provided by the Intel IPS driver are empty routines returning 0, so they can be safely dropped. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * | thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routinesRafael J. Wysocki2012-07-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the thinkpad_acpi driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct platform_driver. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Matthew Garrett <mjg@redhat.com>
| * | thinkpad_acpi: Drop pm_message_t arguments from suspend routinesRafael J. Wysocki2012-07-011-6/+6
| |/ | | | | | | | | | | | | | | | | | | Multiple suspend routines in drivers/platform/x86/thinkpad_acpi.c use take pm_message_t arguments that aren't used by any of them. Make those routines take no arguments as that's what they should do. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Matthew Garrett <mjg@redhat.com>
* | Merge branch 'pm-acpi'Rafael J. Wysocki2012-07-1922-118/+148
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pm-acpi: (24 commits) olpc-xo15-sci: Use struct dev_pm_ops for power management ACPI / PM: Drop PM callbacks from the ACPI bus type ACPI / PM: Drop legacy driver PM callbacks that are not used any more ACPI / PM: Do not execute legacy driver PM callbacks acpi_power_meter: Use struct dev_pm_ops for power management fujitsu-tablet: Use struct dev_pm_ops for power management classmate-laptop: Use struct dev_pm_ops for power management xo15-ebook: Use struct dev_pm_ops for power management toshiba_bluetooth: Use struct dev_pm_ops for power management panasonic-laptop: Use struct dev_pm_ops for power management sony-laptop: Use struct dev_pm_ops for power management hp_accel: Use struct dev_pm_ops for power management toshiba_acpi: Use struct dev_pm_ops for power management ACPI: Use struct dev_pm_ops for power management in the SBS driver ACPI: Use struct dev_pm_ops for power management in the power driver ACPI: Use struct dev_pm_ops for power management in the button driver ACPI: Use struct dev_pm_ops for power management in the battery driver ACPI: Use struct dev_pm_ops for power management in the AC driver ACPI: Use struct dev_pm_ops for power management in processor driver ACPI: Use struct dev_pm_ops for power management in the thermal driver ...
| * | olpc-xo15-sci: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the OLPC XO15 SCI driver define its resume callback through a struct dev_pm_ops object rather than by using a legacy PM hook in struct acpi_device_ops. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
| * | ACPI / PM: Drop PM callbacks from the ACPI bus typeRafael J. Wysocki2012-07-011-51/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since the ACPI bus type's PM callbacks only execute the driver ones without doing anything else, they can be dropped, because the driver callbacks will be executed by the PM core directly if bus type (or other subsystem) callbacks are not present. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI / PM: Drop legacy driver PM callbacks that are not used any moreRafael J. Wysocki2012-07-011-4/+0
| | | | | | | | | | | | | | | | | | | | | Since the legacy ACPI driver PM callbacks included into struct acpi_device_ops are not used any more, drop them. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI / PM: Do not execute legacy driver PM callbacksRafael J. Wysocki2012-07-011-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since all ACPI drivers in the tree should have been switched to power management handling based on struct dev_pm_ops, modify the ACPI bus type driver so that is doesn't execute legacy driver power management callbacks from the functions pointed to by the members of the acpi_bus_pm structure. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | acpi_power_meter: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI power meter driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | fujitsu-tablet: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Make the fujitsu-tablet driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | classmate-laptop: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the classmate-laptop driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
| * | xo15-ebook: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Make the xo15-ebook driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | toshiba_bluetooth: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the toshiba_bluetooth driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Vikram Dhillon <opensolarisdev@gmail.com>
| * | panasonic-laptop: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | Make the panasonic-laptop driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | sony-laptop: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | Make the sony-laptop driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | hp_accel: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the hp_accel driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
| * | toshiba_acpi: Use struct dev_pm_ops for power managementRafael J. Wysocki2012-07-011-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Make the toshiba_acpi driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI: Use struct dev_pm_ops for power management in the SBS driverRafael J. Wysocki2012-07-011-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI Smart Battery System driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI: Use struct dev_pm_ops for power management in the power driverRafael J. Wysocki2012-07-011-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI power resource driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI: Use struct dev_pm_ops for power management in the button driverRafael J. Wysocki2012-07-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI button driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI: Use struct dev_pm_ops for power management in the battery driverRafael J. Wysocki2012-07-011-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI battery driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI: Use struct dev_pm_ops for power management in the AC driverRafael J. Wysocki2012-07-011-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI AC adapter driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI: Use struct dev_pm_ops for power management in processor driverRafael J. Wysocki2012-07-013-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI processor driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI: Use struct dev_pm_ops for power management in the thermal driverRafael J. Wysocki2012-07-011-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI thermal driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI: Use struct dev_pm_ops for power management in the fan driverRafael J. Wysocki2012-07-011-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | Make the ACPI fan driver define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct acpi_device_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI / PM: Make acpi_bus_type use driver struct dev_pm_ops callbacksRafael J. Wysocki2012-07-011-13/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify acpi_bus_type so that it executes PM callbacks provided by drivers through their struct dev_pm_ops objects, if present, while still allowing the legacy ACPI PM callbacks to take precedence. This will make it possible to convert ACPI drivers one by one to handling PM through struct dev_pm_ops instead of the legacy way. The code added by this change is temporary and will be removed when all of the drivers in question have been switched over to the PM handling based on struct dev_pm_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI / PM: Make acpi_bus_type use struct dev_pm_ops for PM handlingRafael J. Wysocki2012-07-011-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Make the acpi_bus_type bus type define its PM callbacks through a struct dev_pm_ops object rather than by using legacy PM hooks in struct bus_type. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | ACPI / PM: Drop pm_message_t argument from device suspend callbackRafael J. Wysocki2012-07-018-11/+9
| |/ | | | | | | | | | | | | | | | | None of the drivers implementing the ACPI device suspend callback uses the pm_message_t argument of it, so this argument may be dropped entirely from that callback. This will simplify switching the ACPI bus type to PM handling based on struct dev_pm_ops. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
* | Merge branch 'pm-sleep'Rafael J. Wysocki2012-07-1912-35/+191
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pm-sleep: PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock PM / Sleep: Add missing static storage class specifiers in main.c PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unset PM / Hibernate: Print hibernation/thaw progress indicator one line at a time. PM / Sleep: Separate printing suspend times from initcall_debug PM / Sleep: add knob for printing device resume times ftrace: Disable function tracing during suspend/resume and hibernation, again PM / Hibernate: Enable suspend to both for in-kernel hibernation.
| * | PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlockRafael J. Wysocki2012-07-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Require processes wanting to use the wake_lock/wake_unlock sysfs files to have the CAP_BLOCK_SUSPEND capability, which also is required for the eventpoll EPOLLWAKEUP flag to be effective, so that all interfaces related to blocking autosleep depend on the same capability. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: stable@vger.kernel.org Acked-by: Michael Kerrisk <mtk.man-pages@gmail.com>
| * | Merge branch 'fixes' into pm-sleepRafael J. Wysocki2012-07-18354-2061/+3390
| |\ \ | | | | | | | | | | | | The 'fixes' branch contains material the next commit depends on.
| * | | PM / Sleep: Add missing static storage class specifiers in main.cSachin Kamat2012-07-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following sparse warnings: drivers/base/power/main.c:48:1: warning: symbol 'dpm_prepared_list' was not declared. Should it be static? drivers/base/power/main.c:49:1: warning: symbol 'dpm_suspended_list' was not declared. Should it be static? drivers/base/power/main.c:50:1: warning: symbol 'dpm_late_early_list' was not declared. Should it be static? drivers/base/power/main.c:51:1: warning: symbol 'dpm_noirq_list' was not declared. Should it be static? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
| * | | PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unsetRafael J. Wysocki2012-07-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The power/async device sysfs attribute is only used if both CONFIG_PM_ADVANCED_DEBUG and CONFIG_PM_SLEEP are set, but the code implementing it doesn't depend on CONFIG_PM_SLEEP. As a result, a build warning appears if CONFIG_PM_ADVANCED_DEBUG is set and CONFIG_PM_SLEEP is not set. Fix it by adding a #ifdef CONFIG_PM_SLEEP around the code in question. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>