]> git.baikalelectronics.ru Git - kernel.git/commit
drm/pci: Use PCI Express Capability accessors
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 4 Jan 2013 19:10:42 +0000 (19:10 +0000)
committerDave Airlie <airlied@redhat.com>
Fri, 8 Feb 2013 03:54:31 +0000 (13:54 +1000)
commit5373721052447dcc7ee9a7b9f50edd0ac38b5f41
tree4fb97623aae202968b86abb4c84b1dca5b63214f
parentf98819855d87f8b294cd93b2ae4947b76a233167
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: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_pci.c