atl1c: Use PCI Express Capability accessors
authorJiang Liu <jiang.liu@huawei.com>
Tue, 24 Jul 2012 09:20:24 +0000 (17:20 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 23 Aug 2012 16:11:14 +0000 (10:11 -0600)
Use PCI Express Capability access functions to simplify atl1c driver.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/net/ethernet/atheros/atl1c/atl1c_main.c

index 1bf5bbfe778e998e9f0ca86897adc6d7001e3ed6..8892e2b644982a1a9faa24cd54d11b330fd33876 100644 (file)
@@ -149,7 +149,7 @@ static void atl1c_reset_pcie(struct atl1c_hw *hw, u32 flag)
        data &= ~(PCI_ERR_UNC_DLP | PCI_ERR_UNC_FCP);
        pci_write_config_dword(pdev, pos + PCI_ERR_UNCOR_SEVER, data);
        /* clear error status */
-       pci_write_config_word(pdev, pci_pcie_cap(pdev) + PCI_EXP_DEVSTA,
+       pcie_capability_write_word(pdev, PCI_EXP_DEVSTA,
                        PCI_EXP_DEVSTA_NFED |
                        PCI_EXP_DEVSTA_FED |
                        PCI_EXP_DEVSTA_CED |