Skip to content

Commit

Permalink
ACPI / PM: Fix build warning in sleep.c for CONFIG_ACPI_SLEEP unset
Browse files Browse the repository at this point in the history
If CONFIG_ACPI_SLEEP is unset, the compiler complains that
pwr_btn_event_pending is defined but not used.  To silence the
warning, move the definition of pwr_btn_event_pending under an
appropriate #ifdef.

Reported-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Rafael J. Wysocki authored and Len Brown committed Jul 26, 2012
1 parent 28a33cb commit a5ca734
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ MODULE_PARM_DESC(gts, "Enable evaluation of _GTS on suspend.");
MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);

static u8 sleep_states[ACPI_S_STATE_COUNT];
static bool pwr_btn_event_pending;

static void acpi_sleep_tts_switch(u32 acpi_state)
{
Expand Down Expand Up @@ -110,6 +109,7 @@ static int acpi_sleep_prepare(u32 acpi_state)

#ifdef CONFIG_ACPI_SLEEP
static u32 acpi_target_sleep_state = ACPI_STATE_S0;
static bool pwr_btn_event_pending;

/*
* The ACPI specification wants us to save NVS memory regions during hibernation
Expand Down

0 comments on commit a5ca734

Please sign in to comment.