diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-09 17:00:02 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-10 07:35:32 -0400 |
commit | 9069240480e24a2d6ce23404c9ad6cabf59b7258 (patch) | |
tree | 6dc30815db7ff040a91844f57848f7a0a1770d2b /drivers/acpi/power.c | |
parent | 300d3739e873d50d4c6e3656f89007a217fb1d29 (diff) |
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[] = { | |||
67 | }; | 67 | }; |
68 | MODULE_DEVICE_TABLE(acpi, power_device_ids); | 68 | MODULE_DEVICE_TABLE(acpi, power_device_ids); |
69 | 69 | ||
70 | #ifdef CONFIG_PM_SLEEP | ||
70 | static int acpi_power_resume(struct device *dev); | 71 | static int acpi_power_resume(struct device *dev); |
72 | #endif | ||
71 | static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume); | 73 | static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume); |
72 | 74 | ||
73 | static struct acpi_driver acpi_power_driver = { | 75 | static struct acpi_driver acpi_power_driver = { |
@@ -775,6 +777,7 @@ static int acpi_power_remove(struct acpi_device *device, int type) | |||
775 | return 0; | 777 | return 0; |
776 | } | 778 | } |
777 | 779 | ||
780 | #ifdef CONFIG_PM_SLEEP | ||
778 | static int acpi_power_resume(struct device *dev) | 781 | static int acpi_power_resume(struct device *dev) |
779 | { | 782 | { |
780 | int result = 0, state; | 783 | int result = 0, state; |
@@ -803,6 +806,7 @@ static int acpi_power_resume(struct device *dev) | |||
803 | 806 | ||
804 | return result; | 807 | return result; |
805 | } | 808 | } |
809 | #endif | ||
806 | 810 | ||
807 | int __init acpi_power_init(void) | 811 | int __init acpi_power_init(void) |
808 | { | 812 | { |