Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103119
b: refs/heads/master
c: f5ccbcf
h: refs/heads/master
i:
  103117: 8748fb4
  103115: b0de9d7
  103111: d26a9d6
  103103: 60872b7
v: v3
  • Loading branch information
Tobias Diedrich authored and Jeff Garzik committed Jun 28, 2008
1 parent c6b894f commit 3dd9271
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a60a82600822d34dcbc4df0866ec6ce643c0e79
refs/heads/master: f5ccbcfacaae57e3312e623432a79d5f1f079cf5
20 changes: 20 additions & 0 deletions trunk/drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,25 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev,
}
return PCI_POWER_ERROR;
}

static int acpi_platform_enable_wakeup(struct device *dev, int is_on)
{
struct acpi_device *adev;
int status;

if (!device_can_wakeup(dev))
return -EINVAL;

if (is_on && !device_may_wakeup(dev))
return -EINVAL;

status = acpi_bus_get_device(DEVICE_ACPI_HANDLE(dev), &adev);
if (status < 0)
return status;

adev->wakeup.state.enabled = !!is_on;
return 0;
}
#endif

static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
Expand Down Expand Up @@ -399,6 +418,7 @@ static int __init acpi_pci_init(void)
return 0;
#ifdef CONFIG_ACPI_SLEEP
platform_pci_choose_state = acpi_pci_choose_state;
platform_enable_wakeup = acpi_platform_enable_wakeup;
#endif
platform_pci_set_power_state = acpi_pci_set_power_state;
return 0;
Expand Down

0 comments on commit 3dd9271

Please sign in to comment.