PCIe ASPM: use pci_is_pcie()

Previous thread: PCI: allow matching of prefetchable resources to non-prefetchable windows by Linux Kernel Mailing List on Friday, December 11, 2009 - 1:59 pm. (1 message)

Next thread: x86/PCI: MMCONFIG: use pointer to simplify pci_mmcfg_config[] structure access by Linux Kernel Mailing List on Friday, December 11, 2009 - 1:59 pm. (1 message)
From: Linux Kernel Mailing List
Date: Friday, December 11, 2009 - 1:59 pm

Gitweb:     http://git.kernel.org/linus/8b06477dc4fcdfc21442ad334d3f3e335225ea0c
Commit:     8b06477dc4fcdfc21442ad334d3f3e335225ea0c
Parent:     5f4d91a1228ac85c75b099efd36fff1a3407335c
Author:     Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
AuthorDate: Wed Nov 11 14:36:52 2009 +0900
Committer:  Jesse Barnes <jbarnes@virtuousgeek.org>
CommitDate: Tue Nov 24 15:25:17 2009 -0800

    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>
---
 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 17baffc..05b8e25 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)
 	 * Configuration, so just check one function
 	 */
 	child = list_entry(linkbus->devices.next, struct pci_dev, bus_list);
-	BUG_ON(!child->is_pcie);
+	BUG_ON(!pci_is_pcie(child));
 
 	/* Check downstream component if bit Slot Clock Configuration is 1 */
 	cpos = pci_pcie_cap(child);
@@ -563,7 +563,7 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
 	struct pcie_link_state *link;
 	int blacklist = !!pcie_aspm_sanity_check(pdev);
 
-	if (aspm_disabled || !pdev->is_pcie || pdev->link_state)
+	if (aspm_disabled || !pci_is_pcie(pdev) || pdev->link_state)
 		return;
 	if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
 	    pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
@@ -629,7 +629,8 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev)
 	struct pci_dev *parent = pdev->bus->self;
 	struct pcie_link_state *link, *root, *parent_link;
 
-	if (aspm_disabled || !pdev->is_pcie || !parent || !parent->link_state)
+	if (aspm_disabled || !pci_is_pcie(pdev) ||
+	    !parent || ...
Previous thread: PCI: allow matching of prefetchable resources to non-prefetchable windows by Linux Kernel Mailing List on Friday, December 11, 2009 - 1:59 pm. (1 message)

Next thread: x86/PCI: MMCONFIG: use pointer to simplify pci_mmcfg_config[] structure access by Linux Kernel Mailing List on Friday, December 11, 2009 - 1:59 pm. (1 message)