[PATCH 4/11] portdrv: move pme capability check

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

 



No reason to check PME capability outside get_port_device_capability().
Do it in get_port_device_capability().

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

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

Index: 20091125/drivers/pci/pcie/portdrv_core.c
===================================================================
--- 20091125.orig/drivers/pci/pcie/portdrv_core.c
+++ 20091125/drivers/pci/pcie/portdrv_core.c
@@ -241,6 +241,9 @@ static int get_port_device_capability(st
 	/* VC support */
 	if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_VC))
 		services |= PCIE_PORT_SERVICE_VC;
+	/* Root ports are capable of generating PME too */
+	if (dev->pcie_type == PCI_EXP_TYPE_ROOT_PORT)
+		services |= PCIE_PORT_SERVICE_PME;
 
 	return services;
 }
@@ -302,9 +305,6 @@ int pcie_port_device_register(struct pci
 	port_data->port_type = dev->pcie_type;
 
 	capabilities = get_port_device_capability(dev);
-	/* Root ports are capable of generating PME too */
-	if (port_data->port_type == PCIE_RC_PORT)
-		capabilities |= PCIE_PORT_SERVICE_PME;
 
 	irq_mode = assign_interrupt_mode(dev, vectors, capabilities);
 	if (irq_mode == PCIE_PORT_NO_IRQ) {

--
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