ACPI / PM: Fix build problem related to acpi_target_system_state()
authorDavid Rientjes <rientjes@google.com>
Sat, 10 Nov 2012 21:48:33 +0000 (22:48 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Nov 2012 23:15:19 +0000 (00:15 +0100)
commit99926a8cd36b6088448fec41aed4a3b5b05b3679
tree465af9d65753fa9fdf75c37522d51958c57acec4
parente5cc8ef31267317f3e177415c84e3f3602e5bfc9
ACPI / PM: Fix build problem related to acpi_target_system_state()

Commit b87b49cd0efd ("ACPI / PM: Move device PM functions related to sleep
states") declared acpi_target_system_state() for CONFIG_PM_SLEEP whereas
it is only defined for CONFIG_ACPI_SLEEP, resulting in the following link
error:

drivers/built-in.o: In function `acpi_pm_device_sleep_wake':
drivers/acpi/device_pm.c:342: undefined reference to `acpi_target_system_state'
drivers/built-in.o: In function `acpi_dev_suspend_late':
drivers/acpi/device_pm.c:501: undefined reference to `acpi_target_system_state'
drivers/built-in.o: In function `acpi_pm_device_sleep_state':
drivers/acpi/device_pm.c:221: undefined reference to `acpi_target_system_state'

Define it only for CONFIG_ACPI_SLEEP and fallback to a dummy definition
for other configs.

[rjw: The problem only occurs for exotic .configs in which
 HIBERNATE_CALLBACKS is selected by XEN_SAVE_RESTORE and neither
 SUSPEND nor HIBERNATION is set.]

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/acpi/acpi_bus.h