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/button.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/button.c')
-rw-r--r-- | drivers/acpi/button.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 79d4c22f7a6d..314a3b84bbc7 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -78,7 +78,9 @@ static int acpi_button_add(struct acpi_device *device); | |||
78 | static int acpi_button_remove(struct acpi_device *device, int type); | 78 | static int acpi_button_remove(struct acpi_device *device, int type); |
79 | static void acpi_button_notify(struct acpi_device *device, u32 event); | 79 | static void acpi_button_notify(struct acpi_device *device, u32 event); |
80 | 80 | ||
81 | #ifdef CONFIG_PM_SLEEP | ||
81 | static int acpi_button_resume(struct device *dev); | 82 | static int acpi_button_resume(struct device *dev); |
83 | #endif | ||
82 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); | 84 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); |
83 | 85 | ||
84 | static struct acpi_driver acpi_button_driver = { | 86 | static struct acpi_driver acpi_button_driver = { |
@@ -310,6 +312,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) | |||
310 | } | 312 | } |
311 | } | 313 | } |
312 | 314 | ||
315 | #ifdef CONFIG_PM_SLEEP | ||
313 | static int acpi_button_resume(struct device *dev) | 316 | static int acpi_button_resume(struct device *dev) |
314 | { | 317 | { |
315 | struct acpi_device *device = to_acpi_device(dev); | 318 | struct acpi_device *device = to_acpi_device(dev); |
@@ -319,6 +322,7 @@ static int acpi_button_resume(struct device *dev) | |||
319 | return acpi_lid_send_state(device); | 322 | return acpi_lid_send_state(device); |
320 | return 0; | 323 | return 0; |
321 | } | 324 | } |
325 | #endif | ||
322 | 326 | ||
323 | static int acpi_button_add(struct acpi_device *device) | 327 | static int acpi_button_add(struct acpi_device *device) |
324 | { | 328 | { |