aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2009-11-25 07:02:51 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-12-04 18:55:37 -0500
commit9e5d0b16dada536dfe2f1e893b6ad0225ff8a2c9 (patch)
tree1861e7d3d52a5aeb91284ca6b1e310811adb2eb3 /drivers/pci
parent2dd60e96b4d52bccd2dd585e776a3449d7b34b8f (diff)
PCI: portdrv: move PME capability check
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@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/portdrv_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 42b21eec15f0..079bbc3ed4f8 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -241,6 +241,9 @@ static int get_port_device_capability(struct pci_dev *dev)
241 /* VC support */ 241 /* VC support */
242 if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_VC)) 242 if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_VC))
243 services |= PCIE_PORT_SERVICE_VC; 243 services |= PCIE_PORT_SERVICE_VC;
244 /* Root ports are capable of generating PME too */
245 if (dev->pcie_type == PCI_EXP_TYPE_ROOT_PORT)
246 services |= PCIE_PORT_SERVICE_PME;
244 247
245 return services; 248 return services;
246} 249}
@@ -302,9 +305,6 @@ int pcie_port_device_register(struct pci_dev *dev)
302 port_data->port_type = dev->pcie_type; 305 port_data->port_type = dev->pcie_type;
303 306
304 capabilities = get_port_device_capability(dev); 307 capabilities = get_port_device_capability(dev);
305 /* Root ports are capable of generating PME too */
306 if (port_data->port_type == PCIE_RC_PORT)
307 capabilities |= PCIE_PORT_SERVICE_PME;
308 308
309 irq_mode = assign_interrupt_mode(dev, vectors, capabilities); 309 irq_mode = assign_interrupt_mode(dev, vectors, capabilities);
310 if (irq_mode == PCIE_PORT_NO_IRQ) { 310 if (irq_mode == PCIE_PORT_NO_IRQ) {