Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82390
b: refs/heads/master
c: 3c1d2b6
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Len Brown committed Feb 1, 2008
1 parent fcdb502 commit c18e874
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c95d47a868f35cd47643d116a3c680cdaa954df8
refs/heads/master: 3c1d2b6085d75df0691cec6a4a053c0aa55fe4c9
4 changes: 0 additions & 4 deletions trunk/drivers/acpi/hardware/hwsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,6 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
"While executing method _SST"));
}

/* Disable/Clear all GPEs */

status = acpi_hw_disable_all_gpes();

return_ACPI_STATUS(status);
}

Expand Down
17 changes: 15 additions & 2 deletions trunk/drivers/acpi/sleep/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,13 @@ static int acpi_pm_begin(suspend_state_t pm_state)

static int acpi_pm_prepare(void)
{
int error = acpi_sleep_prepare(acpi_target_sleep_state);
int error;

error = acpi_sleep_prepare(acpi_target_sleep_state);
if (error)
acpi_target_sleep_state = ACPI_STATE_S0;
else if (!ACPI_SUCCESS(acpi_hw_disable_all_gpes()))
error = -EFAULT;

return error;
}
Expand Down Expand Up @@ -261,7 +264,16 @@ static int acpi_hibernation_start(void)

static int acpi_hibernation_prepare(void)
{
return acpi_sleep_prepare(ACPI_STATE_S4);
int error;

error = acpi_sleep_prepare(ACPI_STATE_S4);
if (error)
return error;

if (!ACPI_SUCCESS(acpi_hw_disable_all_gpes()))
error = -EFAULT;

return error;
}

static int acpi_hibernation_enter(void)
Expand Down Expand Up @@ -426,6 +438,7 @@ static void acpi_power_off_prepare(void)
{
/* Prepare to power off the system */
acpi_sleep_prepare(ACPI_STATE_S5);
acpi_hw_disable_all_gpes();
}

static void acpi_power_off(void)
Expand Down

0 comments on commit c18e874

Please sign in to comment.