diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-07-24 17:20:08 +0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 10:11:11 -0600 |
commit | 2dcfaf85cd0ced6dcfd4bf0012354b3fd2ed1f38 (patch) | |
tree | 5a15e98507a8ff7452378f02f74f666f1d9b23ce /drivers/pci/pcie/portdrv_pci.c | |
parent | 028fbad480edfc73157408f894a29385afc9689e (diff) | |
download | op-kernel-dev-2dcfaf85cd0ced6dcfd4bf0012354b3fd2ed1f38.zip op-kernel-dev-2dcfaf85cd0ced6dcfd4bf0012354b3fd2ed1f38.tar.gz |
PCI/portdrv: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify portdrv.
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/pcie/portdrv_pci.c')
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 24d1463..2360330 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -64,14 +64,7 @@ __setup("pcie_ports=", pcie_port_setup); */ void pcie_clear_root_pme_status(struct pci_dev *dev) { - int rtsta_pos; - u32 rtsta; - - rtsta_pos = pci_pcie_cap(dev) + PCI_EXP_RTSTA; - - pci_read_config_dword(dev, rtsta_pos, &rtsta); - rtsta |= PCI_EXP_RTSTA_PME; - pci_write_config_dword(dev, rtsta_pos, rtsta); + pcie_capability_set_dword(dev, PCI_EXP_RTSTA, PCI_EXP_RTSTA_PME); } static int pcie_portdrv_restore_config(struct pci_dev *dev) |