Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70762
b: refs/heads/master
c: 36e02b6
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed Oct 17, 2007
1 parent 04f8ab2 commit 4046faf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: e8e961574b5b417d3fc277cbf436081fce4fc2e1
refs/heads/master: 36e02b62084efa72f1f04c95e13295a456f394c2
15 changes: 10 additions & 5 deletions trunk/drivers/pnp/pnpacpi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,16 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev)
#ifdef CONFIG_ACPI_SLEEP
static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state)
{
return acpi_bus_set_power((acpi_handle) dev->data,
acpi_pm_device_sleep_state(&dev->dev,
device_may_wakeup
(&dev->dev),
NULL));
int power_state;

power_state = acpi_pm_device_sleep_state(&dev->dev,
device_may_wakeup(&dev->dev),
NULL);
if (power_state < 0)
power_state = (state.event == PM_EVENT_ON) ?
ACPI_STATE_D0 : ACPI_STATE_D3;

return acpi_bus_set_power((acpi_handle) dev->data, power_state);
}

static int pnpacpi_resume(struct pnp_dev *dev)
Expand Down

0 comments on commit 4046faf

Please sign in to comment.