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/thermal.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/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 9fe90e9fecb5..edda74a43406 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -106,7 +106,9 @@ static const struct acpi_device_id thermal_device_ids[] = { | |||
106 | }; | 106 | }; |
107 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); | 107 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); |
108 | 108 | ||
109 | #ifdef CONFIG_PM_SLEEP | ||
109 | static int acpi_thermal_resume(struct device *dev); | 110 | static int acpi_thermal_resume(struct device *dev); |
111 | #endif | ||
110 | static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume); | 112 | static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume); |
111 | 113 | ||
112 | static struct acpi_driver acpi_thermal_driver = { | 114 | static struct acpi_driver acpi_thermal_driver = { |
@@ -1041,6 +1043,7 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) | |||
1041 | return 0; | 1043 | return 0; |
1042 | } | 1044 | } |
1043 | 1045 | ||
1046 | #ifdef CONFIG_PM_SLEEP | ||
1044 | static int acpi_thermal_resume(struct device *dev) | 1047 | static int acpi_thermal_resume(struct device *dev) |
1045 | { | 1048 | { |
1046 | struct acpi_thermal *tz; | 1049 | struct acpi_thermal *tz; |
@@ -1075,6 +1078,7 @@ static int acpi_thermal_resume(struct device *dev) | |||
1075 | 1078 | ||
1076 | return AE_OK; | 1079 | return AE_OK; |
1077 | } | 1080 | } |
1081 | #endif | ||
1078 | 1082 | ||
1079 | static int thermal_act(const struct dmi_system_id *d) { | 1083 | static int thermal_act(const struct dmi_system_id *d) { |
1080 | 1084 | ||