aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/pciehp_acpi.c')
-rw-r--r--drivers/pci/hotplug/pciehp_acpi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/pciehp_acpi.c b/drivers/pci/hotplug/pciehp_acpi.c
index 37c8d3d0323e..1f4000a5a108 100644
--- a/drivers/pci/hotplug/pciehp_acpi.c
+++ b/drivers/pci/hotplug/pciehp_acpi.c
@@ -26,6 +26,7 @@
26#include <linux/acpi.h> 26#include <linux/acpi.h>
27#include <linux/pci.h> 27#include <linux/pci.h>
28#include <linux/pci_hotplug.h> 28#include <linux/pci_hotplug.h>
29#include <linux/slab.h>
29#include "pciehp.h" 30#include "pciehp.h"
30 31
31#define PCIEHP_DETECT_PCIE (0) 32#define PCIEHP_DETECT_PCIE (0)
@@ -87,7 +88,8 @@ static int __init dummy_probe(struct pcie_device *dev)
87 /* Note: pciehp_detect_mode != PCIEHP_DETECT_ACPI here */ 88 /* Note: pciehp_detect_mode != PCIEHP_DETECT_ACPI here */
88 if (pciehp_get_hp_hw_control_from_firmware(pdev)) 89 if (pciehp_get_hp_hw_control_from_firmware(pdev))
89 return -ENODEV; 90 return -ENODEV;
90 if (!(pos = pci_find_capability(pdev, PCI_CAP_ID_EXP))) 91 pos = pci_pcie_cap(pdev);
92 if (!pos)
91 return -ENODEV; 93 return -ENODEV;
92 pci_read_config_dword(pdev, pos + PCI_EXP_SLTCAP, &slot_cap); 94 pci_read_config_dword(pdev, pos + PCI_EXP_SLTCAP, &slot_cap);
93 slot = kzalloc(sizeof(*slot), GFP_KERNEL); 95 slot = kzalloc(sizeof(*slot), GFP_KERNEL);