Skip to content
Commit dd66cc2e authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Dave Airlie
Browse files

drm/pci: Use PCI Express Capability accessors



Use PCI Express Capability access functions to simplify this code a bit.
For non-PCIe devices or pre-PCIe 3.0 devices that don't implement the Link
Capabilities 2 register, pcie_capability_read_dword() reads a zero.

Since we're only testing whether the bits we care about are set, there's no
need to mask out the other bits we *don't* care about.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent f8acf6f4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment