Skip to content

Commit

Permalink
drm/pci: Use the standard #defines for PCIe Link Capability bits
Browse files Browse the repository at this point in the history
Use the standard #defines rather than bare numbers for the PCIe Link
Capabilities speed bits.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Bjorn Helgaas authored and Dave Airlie committed Feb 8, 2013
1 parent 03f6509 commit 9fe0423
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/drm_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask)
if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB)
*mask |= DRM_PCIE_SPEED_80;
} else {
if (lnkcap & 1)
if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB)
*mask |= DRM_PCIE_SPEED_25;
if (lnkcap & 2)
if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB)
*mask |= DRM_PCIE_SPEED_50;
}

Expand Down

0 comments on commit 9fe0423

Please sign in to comment.