Commit d67c0ac1 authored by Jani Nikula's avatar Jani Nikula

drm/i915: reduce indent in pch detection

Save some horizontal space.
Reviewed-by: default avatarDavid Weinehall <david.weinehall@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180202130416.18233-1-jani.nikula@intel.com
parent fae919f0
......@@ -182,8 +182,12 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)
* of only checking the first one.
*/
while ((pch = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, pch))) {
if (pch->vendor == PCI_VENDOR_ID_INTEL) {
unsigned short id = pch->device & INTEL_PCH_DEVICE_ID_MASK;
unsigned short id;
if (pch->vendor != PCI_VENDOR_ID_INTEL)
continue;
id = pch->device & INTEL_PCH_DEVICE_ID_MASK;
dev_priv->pch_id = id;
......@@ -269,14 +273,13 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)
PCI_SUBVENDOR_ID_REDHAT_QUMRANET &&
pch->subsystem_device ==
PCI_SUBDEVICE_ID_QEMU)) {
dev_priv->pch_type =
intel_virt_detect_pch(dev_priv);
} else
dev_priv->pch_type = intel_virt_detect_pch(dev_priv);
} else {
continue;
}
break;
}
}
if (!pch)
DRM_DEBUG_KMS("No PCH found.\n");
......
Markdown is supported
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