mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
PCI: Use PCI Express Capability accessor
Use PCI Express Capability access functions to simplify device Capabilities Register usages. Signed-off-by: Myron Stowe <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
This commit is contained in:
parent
7c9c003c68
commit
1c531d82ee
3 changed files with 4 additions and 4 deletions
|
|
@ -472,7 +472,7 @@ EXPORT_SYMBOL_GPL(pci_cfg_access_unlock);
|
|||
|
||||
static inline int pcie_cap_version(const struct pci_dev *dev)
|
||||
{
|
||||
return dev->pcie_flags_reg & PCI_EXP_FLAGS_VERS;
|
||||
return pcie_caps_reg(dev) & PCI_EXP_FLAGS_VERS;
|
||||
}
|
||||
|
||||
static inline bool pcie_cap_has_devctl(const struct pci_dev *dev)
|
||||
|
|
@ -497,7 +497,7 @@ static inline bool pcie_cap_has_sltctl(const struct pci_dev *dev)
|
|||
return pcie_cap_version(dev) > 1 ||
|
||||
type == PCI_EXP_TYPE_ROOT_PORT ||
|
||||
(type == PCI_EXP_TYPE_DOWNSTREAM &&
|
||||
dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT);
|
||||
pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT);
|
||||
}
|
||||
|
||||
static inline bool pcie_cap_has_rtctl(const struct pci_dev *dev)
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ static int get_port_device_capability(struct pci_dev *dev)
|
|||
|
||||
/* Hot-Plug Capable */
|
||||
if ((cap_mask & PCIE_PORT_SERVICE_HP) &&
|
||||
dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT) {
|
||||
pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT) {
|
||||
pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, ®32);
|
||||
if (reg32 & PCI_EXP_SLTCAP_HPC) {
|
||||
services |= PCIE_PORT_SERVICE_HP;
|
||||
|
|
|
|||
Loading…
Reference in a new issue