Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102001
b: refs/heads/master
c: 2fe2de5
h: refs/heads/master
i:
  101999: a793162
v: v3
  • Loading branch information
David Brownell authored and Andi Kleen committed Jul 16, 2008
1 parent 17858f2 commit 1931267
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 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: cc7e51666d82aedfd6b9a033ca1a10d71c21f1ca
refs/heads/master: 2fe2de5f6c283a7d2a82c1b99a19012079cee555
8 changes: 4 additions & 4 deletions trunk/drivers/acpi/sleep/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ int acpi_suspend(u32 acpi_state)
/**
* acpi_pm_device_sleep_state - return preferred power state of ACPI device
* in the system sleep state given by %acpi_target_sleep_state
* @dev: device to examine
* @wake: if set, the device should be able to wake up the system
* @dev: device to examine; its driver model wakeup flags control
* whether it should be able to wake up the system
* @d_min_p: used to store the upper limit of allowed states range
* Return value: preferred power state of the device on success, -ENODEV on
* failure (ie. if there's no 'struct acpi_device' for @dev)
Expand All @@ -387,7 +387,7 @@ int acpi_suspend(u32 acpi_state)
* via @wake.
*/

int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p)
{
acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
struct acpi_device *adev;
Expand Down Expand Up @@ -426,7 +426,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
* can wake the system. _S0W may be valid, too.
*/
if (acpi_target_sleep_state == ACPI_STATE_S0 ||
(wake && adev->wakeup.state.enabled &&
(device_may_wakeup(dev) && adev->wakeup.state.enabled &&
adev->wakeup.sleep_state <= acpi_target_sleep_state)) {
acpi_status status;

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev,
{
int acpi_state;

acpi_state = acpi_pm_device_sleep_state(&pdev->dev,
device_may_wakeup(&pdev->dev), NULL);
acpi_state = acpi_pm_device_sleep_state(&pdev->dev, NULL);
if (acpi_state < 0)
return PCI_POWER_ERROR;

Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/pnp/pnpacpi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state)
{
int power_state;

power_state = acpi_pm_device_sleep_state(&dev->dev,
device_may_wakeup(&dev->dev),
NULL);
power_state = acpi_pm_device_sleep_state(&dev->dev, NULL);
if (power_state < 0)
power_state = (state.event == PM_EVENT_ON) ?
ACPI_STATE_D0 : ACPI_STATE_D3;
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle))

#ifdef CONFIG_PM_SLEEP
int acpi_pm_device_sleep_state(struct device *, int, int *);
int acpi_pm_device_sleep_state(struct device *, int *);
#else /* !CONFIG_PM_SLEEP */
static inline int acpi_pm_device_sleep_state(struct device *d, int w, int *p)
static inline int acpi_pm_device_sleep_state(struct device *d, int *p)
{
if (p)
*p = ACPI_STATE_D0;
Expand Down

0 comments on commit 1931267

Please sign in to comment.