diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2009-11-11 00:36:52 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-24 18:25:17 -0500 |
commit | 8b06477dc4fcdfc21442ad334d3f3e335225ea0c (patch) | |
tree | 77a614b6b702e884944f2bf7e2b44bef922e4633 /drivers/pci/pcie/aspm.c | |
parent | 5f4d91a1228ac85c75b099efd36fff1a3407335c (diff) |
PCIe ASPM: use pci_is_pcie()
Change for PCIe ASPM driver to use pci_is_pcie() instead of checking
pci_dev->is_pcie.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie/aspm.c')
-rw-r--r-- | drivers/pci/pcie/aspm.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 17baffcef5fc..05b8e25b551b 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c | |||
@@ -191,7 +191,7 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link) | |||
191 | * Configuration, so just check one function | 191 | * Configuration, so just check one function |
192 | */ | 192 | */ |
193 | child = list_entry(linkbus->devices.next, struct pci_dev, bus_list); | 193 | child = list_entry(linkbus->devices.next, struct pci_dev, bus_list); |
194 | BUG_ON(!child->is_pcie); | 194 | BUG_ON(!pci_is_pcie(child)); |
195 | 195 | ||
196 | /* Check downstream component if bit Slot Clock Configuration is 1 */ | 196 | /* Check downstream component if bit Slot Clock Configuration is 1 */ |
197 | cpos = pci_pcie_cap(child); | 197 | cpos = pci_pcie_cap(child); |
@@ -563,7 +563,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev) | |||
563 | struct pcie_link_state *link; | 563 | struct pcie_link_state *link; |
564 | int blacklist = !!pcie_aspm_sanity_check(pdev); | 564 | int blacklist = !!pcie_aspm_sanity_check(pdev); |
565 | 565 | ||
566 | if (aspm_disabled || !pdev->is_pcie || pdev->link_state) | 566 | if (aspm_disabled || !pci_is_pcie(pdev) || pdev->link_state) |
567 | return; | 567 | return; |
568 | if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && | 568 | if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && |
569 | pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) | 569 | pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) |
@@ -629,7 +629,8 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev) | |||
629 | struct pci_dev *parent = pdev->bus->self; | 629 | struct pci_dev *parent = pdev->bus->self; |
630 | struct pcie_link_state *link, *root, *parent_link; | 630 | struct pcie_link_state *link, *root, *parent_link; |
631 | 631 | ||
632 | if (aspm_disabled || !pdev->is_pcie || !parent || !parent->link_state) | 632 | if (aspm_disabled || !pci_is_pcie(pdev) || |
633 | !parent || !parent->link_state) | ||
633 | return; | 634 | return; |
634 | if ((parent->pcie_type != PCI_EXP_TYPE_ROOT_PORT) && | 635 | if ((parent->pcie_type != PCI_EXP_TYPE_ROOT_PORT) && |
635 | (parent->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) | 636 | (parent->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) |
@@ -668,7 +669,7 @@ void pcie_aspm_pm_state_change(struct pci_dev *pdev) | |||
668 | { | 669 | { |
669 | struct pcie_link_state *link = pdev->link_state; | 670 | struct pcie_link_state *link = pdev->link_state; |
670 | 671 | ||
671 | if (aspm_disabled || !pdev->is_pcie || !link) | 672 | if (aspm_disabled || !pci_is_pcie(pdev) || !link) |
672 | return; | 673 | return; |
673 | if ((pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT) && | 674 | if ((pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT) && |
674 | (pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) | 675 | (pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) |
@@ -694,7 +695,7 @@ void pci_disable_link_state(struct pci_dev *pdev, int state) | |||
694 | struct pci_dev *parent = pdev->bus->self; | 695 | struct pci_dev *parent = pdev->bus->self; |
695 | struct pcie_link_state *link; | 696 | struct pcie_link_state *link; |
696 | 697 | ||
697 | if (aspm_disabled || !pdev->is_pcie) | 698 | if (aspm_disabled || !pci_is_pcie(pdev)) |
698 | return; | 699 | return; |
699 | if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT || | 700 | if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT || |
700 | pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM) | 701 | pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM) |
@@ -839,8 +840,9 @@ void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) | |||
839 | { | 840 | { |
840 | struct pcie_link_state *link_state = pdev->link_state; | 841 | struct pcie_link_state *link_state = pdev->link_state; |
841 | 842 | ||
842 | if (!pdev->is_pcie || (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && | 843 | if (!pci_is_pcie(pdev) || |
843 | pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) || !link_state) | 844 | (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && |
845 | pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) || !link_state) | ||
844 | return; | 846 | return; |
845 | 847 | ||
846 | if (link_state->aspm_support) | 848 | if (link_state->aspm_support) |
@@ -855,8 +857,9 @@ void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev) | |||
855 | { | 857 | { |
856 | struct pcie_link_state *link_state = pdev->link_state; | 858 | struct pcie_link_state *link_state = pdev->link_state; |
857 | 859 | ||
858 | if (!pdev->is_pcie || (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && | 860 | if (!pci_is_pcie(pdev) || |
859 | pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) || !link_state) | 861 | (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && |
862 | pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) || !link_state) | ||
860 | return; | 863 | return; |
861 | 864 | ||
862 | if (link_state->aspm_support) | 865 | if (link_state->aspm_support) |