diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-07-24 17:20:06 +0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 09:41:37 -0600 |
commit | 59875ae489609b2267548dc85160c5f0f0c6f9d4 (patch) | |
tree | efadf88450c3d239806b0020c2b16b56c16f598d /drivers/pci/quirks.c | |
parent | 8c0d3a02c1309eb6112d2e7c8172e8ceb26ecfca (diff) |
PCI/core: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify core.
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>
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 51553179e96..aa77538c50c 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3081,17 +3081,10 @@ static int reset_intel_generic_dev(struct pci_dev *dev, int probe) static int reset_intel_82599_sfp_virtfn(struct pci_dev *dev, int probe) { - int pos; - - pos = pci_find_capability(dev, PCI_CAP_ID_EXP); - if (!pos) - return -ENOTTY; - if (probe) return 0; - pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, - PCI_EXP_DEVCTL_BCR_FLR); + pcie_capability_write_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); msleep(100); return 0; |