[PATCH 1/2] PCIe PME: use pci_is_pcie()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use pci_is_pcie() instead of looking at obsolete is_pcie field in
struct pci_dev.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>

---
 drivers/pci/pcie/pme/pcie_pme.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: 20100218/drivers/pci/pcie/pme/pcie_pme.c
===================================================================
--- 20100218.orig/drivers/pci/pcie/pme/pcie_pme.c
+++ 20100218/drivers/pci/pcie/pme/pcie_pme.c
@@ -144,7 +144,7 @@ static bool pcie_pme_walk_bus(struct pci
 
 	list_for_each_entry(dev, &bus->devices, bus_list) {
 		/* Skip PCIe devices in case we started from a root port. */
-		if (!dev->is_pcie && pci_check_pme_status(dev)) {
+		if (!pci_is_pcie(dev) && pci_check_pme_status(dev)) {
 			pm_request_resume(&dev->dev);
 			ret = true;
 		}
@@ -177,7 +177,7 @@ static bool pcie_pme_from_pci_bridge(str
 	if (!dev)
 		return false;
 
-	if (dev->is_pcie && dev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) {
+	if (pci_is_pcie(dev) && dev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) {
 		down_read(&pci_bus_sem);
 		if (pcie_pme_walk_bus(bus))
 			found = true;
@@ -389,7 +389,7 @@ static void pcie_pme_mark_devices(struct
 
 		down_read(&pci_bus_sem);
 		list_for_each_entry(dev, &bus->devices, bus_list)
-			if (dev->is_pcie
+			if (pci_is_pcie(dev)
 			    && dev->pcie_type == PCI_EXP_TYPE_RC_END)
 				pcie_pme_set_native(dev, NULL);
 		up_read(&pci_bus_sem);

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux