diff options
author | Yijing Wang <wangyijing@huawei.com> | 2013-06-18 16:22:14 +0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-06-18 12:05:34 -0600 |
commit | 728cdb7582a230234795619036d887d7f52bce1e (patch) | |
tree | 0de33c16dddda3b7e94d3657d27150ee20c24201 /drivers/pci/pci.c | |
parent | fc6504b3a4dc9beae782a11e6f7c3c4a9f077fb8 (diff) |
PCI: Use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
PCI PM cap register offset has been saved in pci_pm_init(),
so we can use pdev->pm_cap instead of using pci_find_capability(..)
here.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 709791b70ca..e37fea6e178 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -805,7 +805,7 @@ pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { pci_power_t ret; - if (!pci_find_capability(dev, PCI_CAP_ID_PM)) + if (!dev->pm_cap) return PCI_D0; ret = platform_pci_choose_state(dev); |