Skip to content

Commit

Permalink
PCI PM: Fix pci_prepare_to_sleep
Browse files Browse the repository at this point in the history
The recently introduced pci_prepare_to_sleep() needs the following fix,
because there are systems which are not power manageable by ACPI (ie.
ACPI doesn't provide methods to put the device into low power states and
back), but require ACPI hooks to be executed for wake-up to work.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Rafael J. Wysocki authored and Jesse Barnes committed Jul 14, 2008
1 parent beef312 commit c157dfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,6 @@ int pci_prepare_to_sleep(struct pci_dev *dev)
break;
default:
target_state = state;
pci_enable_wake(dev, target_state, true);
}
} else if (device_may_wakeup(&dev->dev)) {
/*
Expand All @@ -1167,10 +1166,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev)
while (target_state
&& !(dev->pme_support & (1 << target_state)))
target_state--;
pci_pme_active(dev, true);
}
}

pci_enable_wake(dev, target_state, true);

error = pci_set_power_state(dev, target_state);

if (error)
Expand Down

0 comments on commit c157dfa

Please sign in to comment.