diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 1531f3a49879..37499127c801 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
@@ -678,7 +679,7 @@ static void __pci_start_power_transition(struct pci_dev *dev, pci_power_t state) | |||
678 | */ | 679 | */ |
679 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state) | 680 | int __pci_complete_power_transition(struct pci_dev *dev, pci_power_t state) |
680 | { | 681 | { |
681 | return state > PCI_D0 ? | 682 | return state >= PCI_D0 ? |
682 | pci_platform_power_transition(dev, state) : -EINVAL; | 683 | pci_platform_power_transition(dev, state) : -EINVAL; |
683 | } | 684 | } |
684 | EXPORT_SYMBOL_GPL(__pci_complete_power_transition); | 685 | EXPORT_SYMBOL_GPL(__pci_complete_power_transition); |
@@ -715,10 +716,6 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
715 | */ | 716 | */ |
716 | return 0; | 717 | return 0; |
717 | 718 | ||
718 | /* Check if we're already there */ | ||
719 | if (dev->current_state == state) | ||
720 | return 0; | ||
721 | |||
722 | __pci_start_power_transition(dev, state); | 719 | __pci_start_power_transition(dev, state); |
723 | 720 | ||
724 | /* This device is quirked not to be put into D3, so | 721 | /* This device is quirked not to be put into D3, so |