Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kenji Kaneshige and committed by
Jesse Barnes
8b06477d 5f4d91a1

+12 -9
+12 -9
drivers/pci/pcie/aspm.c
··· 191 191 * Configuration, so just check one function 192 192 */ 193 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 196 /* Check downstream component if bit Slot Clock Configuration is 1 */ 197 197 cpos = pci_pcie_cap(child); ··· 563 563 struct pcie_link_state *link; 564 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 567 return; 568 568 if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && 569 569 pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) ··· 629 629 struct pci_dev *parent = pdev->bus->self; 630 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 634 return; 634 635 if ((parent->pcie_type != PCI_EXP_TYPE_ROOT_PORT) && 635 636 (parent->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) ··· 669 668 { 670 669 struct pcie_link_state *link = pdev->link_state; 671 670 672 - if (aspm_disabled || !pdev->is_pcie || !link) 671 + if (aspm_disabled || !pci_is_pcie(pdev) || !link) 673 672 return; 674 673 if ((pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT) && 675 674 (pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)) ··· 695 694 struct pci_dev *parent = pdev->bus->self; 696 695 struct pcie_link_state *link; 697 696 698 - if (aspm_disabled || !pdev->is_pcie) 697 + if (aspm_disabled || !pci_is_pcie(pdev)) 699 698 return; 700 699 if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT || 701 700 pdev->pcie_type == PCI_EXP_TYPE_DOWNSTREAM) ··· 840 839 { 841 840 struct pcie_link_state *link_state = pdev->link_state; 842 841 843 - if (!pdev->is_pcie || (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && 844 - pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) || !link_state) 842 + if (!pci_is_pcie(pdev) || 843 + (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && 844 + pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) || !link_state) 845 845 return; 846 846 847 847 if (link_state->aspm_support) ··· 857 855 { 858 856 struct pcie_link_state *link_state = pdev->link_state; 859 857 860 - if (!pdev->is_pcie || (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && 861 - pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) || !link_state) 858 + if (!pci_is_pcie(pdev) || 859 + (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT && 860 + pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM) || !link_state) 862 861 return; 863 862 864 863 if (link_state->aspm_support)