diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 1b34fc56067e..c62d2f043397 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -333,13 +333,17 @@ pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) | |||
333 | if (platform_pci_choose_state) { | 333 | if (platform_pci_choose_state) { |
334 | ret = platform_pci_choose_state(dev, state); | 334 | ret = platform_pci_choose_state(dev, state); |
335 | if (ret >= 0) | 335 | if (ret >= 0) |
336 | state = ret; | 336 | state.event = ret; |
337 | } | 337 | } |
338 | switch (state) { | 338 | |
339 | case 0: return PCI_D0; | 339 | switch (state.event) { |
340 | case 3: return PCI_D3hot; | 340 | case PM_EVENT_ON: |
341 | return PCI_D0; | ||
342 | case PM_EVENT_FREEZE: | ||
343 | case PM_EVENT_SUSPEND: | ||
344 | return PCI_D3hot; | ||
341 | default: | 345 | default: |
342 | printk("They asked me for state %d\n", state); | 346 | printk("They asked me for state %d\n", state.event); |
343 | BUG(); | 347 | BUG(); |
344 | } | 348 | } |
345 | return PCI_D0; | 349 | return PCI_D0; |