diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 5af941807785..a1c66e8ea5f2 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -235,7 +235,7 @@ pci_find_parent_resource(const struct pci_dev *dev, struct resource *res) | |||
235 | * -EIO if device does not support PCI PM. | 235 | * -EIO if device does not support PCI PM. |
236 | * 0 if we can successfully change the power state. | 236 | * 0 if we can successfully change the power state. |
237 | */ | 237 | */ |
238 | 238 | int (*platform_pci_set_power_state)(struct pci_dev *dev, pci_power_t t) = NULL; | |
239 | int | 239 | int |
240 | pci_set_power_state(struct pci_dev *dev, pci_power_t state) | 240 | pci_set_power_state(struct pci_dev *dev, pci_power_t state) |
241 | { | 241 | { |
@@ -299,8 +299,15 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
299 | msleep(10); | 299 | msleep(10); |
300 | else if (state == PCI_D2 || dev->current_state == PCI_D2) | 300 | else if (state == PCI_D2 || dev->current_state == PCI_D2) |
301 | udelay(200); | 301 | udelay(200); |
302 | dev->current_state = state; | ||
303 | 302 | ||
303 | /* | ||
304 | * Give firmware a chance to be called, such as ACPI _PRx, _PSx | ||
305 | * Firmware method after natice method ? | ||
306 | */ | ||
307 | if (platform_pci_set_power_state) | ||
308 | platform_pci_set_power_state(dev, state); | ||
309 | |||
310 | dev->current_state = state; | ||
304 | return 0; | 311 | return 0; |
305 | } | 312 | } |
306 | 313 | ||