drm/i915: reduce indent in pch detection

Save some horizontal space.

Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180202130416.18233-1-jani.nikula@intel.com
This commit is contained in:
Jani Nikula 2018-02-02 15:04:16 +02:00
parent fae919f076
commit d67c0ac19f

View file

@ -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");