summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_acpi.c
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@huawei.com>2012-07-24 17:20:09 +0800
committerBjorn Helgaas <bhelgaas@google.com>2012-08-23 10:11:11 -0600
commit537a77e65d2e971ff2688e285cc88283d4ce13b0 (patch)
treedfc6e2b3af6c3c48bc99fa91e8a327a4ede4dd3d /drivers/pci/hotplug/pciehp_acpi.c
parent2dcfaf85cd0ced6dcfd4bf0012354b3fd2ed1f38 (diff)
PCI/pciehp: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify pciehp. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_acpi.c')
-rw-r--r--drivers/pci/hotplug/pciehp_acpi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/pciehp_acpi.c b/drivers/pci/hotplug/pciehp_acpi.c
index 376d70d1717..24d709b7388 100644
--- a/drivers/pci/hotplug/pciehp_acpi.c
+++ b/drivers/pci/hotplug/pciehp_acpi.c
@@ -81,16 +81,12 @@ static struct list_head __initdata dummy_slots = LIST_HEAD_INIT(dummy_slots);
/* Dummy driver for dumplicate name detection */
static int __init dummy_probe(struct pcie_device *dev)
{
- int pos;
u32 slot_cap;
acpi_handle handle;
struct dummy_slot *slot, *tmp;
struct pci_dev *pdev = dev->port;
- pos = pci_pcie_cap(pdev);
- if (!pos)
- return -ENODEV;
- pci_read_config_dword(pdev, pos + PCI_EXP_SLTCAP, &slot_cap);
+ pcie_capability_read_dword(pdev, PCI_EXP_SLTCAP, &slot_cap);
slot = kzalloc(sizeof(*slot), GFP_KERNEL);
if (!slot)
return -ENOMEM;