Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59179
b: refs/heads/master
c: cca03de
h: refs/heads/master
i:
  59177: 72aef5f
  59175: 237df98
v: v3
  • Loading branch information
Andrew Lunn authored and Greg Kroah-Hartman committed Jul 11, 2007
1 parent 23aa4ff commit 2675c07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 0bec2c85bb269446358dceae82ca7822ccfd4e9f
refs/heads/master: cca03dec2f0eb8f3c4578e067d2b20a366b940db
14 changes: 7 additions & 7 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,13 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
if ((state == PCI_D1 || state == PCI_D2) && pci_no_d1d2(dev))
return 0;

/* find PCI PM capability in list */
pm = pci_find_capability(dev, PCI_CAP_ID_PM);

/* abort if the device doesn't support PM capabilities */
if (!pm)
return -EIO;

/* Validate current state:
* Can enter D0 from any state, but if we can only go deeper
* to sleep if we're already in a low power state
Expand All @@ -418,13 +425,6 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
return 0; /* we're already there */


/* find PCI PM capability in list */
pm = pci_find_capability(dev, PCI_CAP_ID_PM);

/* abort if the device doesn't support PM capabilities */
if (!pm)
return -EIO;

pci_read_config_word(dev,pm + PCI_PM_PMC,&pmc);
if ((pmc & PCI_PM_CAP_VER_MASK) > 3) {
printk(KERN_DEBUG
Expand Down

0 comments on commit 2675c07

Please sign in to comment.