diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-09 23:00:02 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-10 13:35:32 +0200 |
commit | 9069240480e24a2d6ce23404c9ad6cabf59b7258 (patch) | |
tree | 6dc30815db7ff040a91844f57848f7a0a1770d2b /drivers/acpi/power.c | |
parent | 300d3739e873d50d4c6e3656f89007a217fb1d29 (diff) | |
download | linux-stable-9069240480e24a2d6ce23404c9ad6cabf59b7258.tar.gz linux-stable-9069240480e24a2d6ce23404c9ad6cabf59b7258.tar.bz2 linux-stable-9069240480e24a2d6ce23404c9ad6cabf59b7258.zip |
ACPI / PM: Fix unused function warnings for CONFIG_PM_SLEEP
According to compiler warnings, several suspend/resume functions
in ACPI drivers are not used for CONFIG_PM_SLEEP unset, so add
#ifdefs to prevent them from being built in that case.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r-- | drivers/acpi/power.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 215ecd097408..fc1803414629 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -67,7 +67,9 @@ static const struct acpi_device_id power_device_ids[] = { }; MODULE_DEVICE_TABLE(acpi, power_device_ids); +#ifdef CONFIG_PM_SLEEP static int acpi_power_resume(struct device *dev); +#endif static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume); static struct acpi_driver acpi_power_driver = { @@ -775,6 +777,7 @@ static int acpi_power_remove(struct acpi_device *device, int type) return 0; } +#ifdef CONFIG_PM_SLEEP static int acpi_power_resume(struct device *dev) { int result = 0, state; @@ -803,6 +806,7 @@ static int acpi_power_resume(struct device *dev) return result; } +#endif int __init acpi_power_init(void) { |