summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/battery.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-08-09 23:00:02 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-08-10 13:35:32 +0200
commit9069240480e24a2d6ce23404c9ad6cabf59b7258 (patch)
tree6dc30815db7ff040a91844f57848f7a0a1770d2b /drivers/acpi/battery.c
parent300d3739e873d50d4c6e3656f89007a217fb1d29 (diff)
downloadop-kernel-dev-9069240480e24a2d6ce23404c9ad6cabf59b7258.zip
op-kernel-dev-9069240480e24a2d6ce23404c9ad6cabf59b7258.tar.gz
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/battery.c')
-rw-r--r--drivers/acpi/battery.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index ff2c876..45e3e17 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -1052,6 +1052,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
/* this is needed to learn about changes made in suspended state */
static int acpi_battery_resume(struct device *dev)
{
@@ -1068,6 +1069,7 @@ static int acpi_battery_resume(struct device *dev)
acpi_battery_update(battery);
return 0;
}
+#endif
static SIMPLE_DEV_PM_OPS(acpi_battery_pm, NULL, acpi_battery_resume);
OpenPOWER on IntegriCloud