Multiple positive and negative checks for hpd[i] & hotplug_trigger gets
hard to read. Simplify. This should make follow-up patches merging the
two loops easier. No functional changes.
Signed-off-by: Jani Nikula <[email protected]>
Reviewed-by: Paulo Zanoni <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
}
for_each_hpd_pin(i) {
- if (hpd[i] & hotplug_trigger &&
- dev_priv->hotplug.stats[i].state == HPD_DISABLED) {
+ if (!(hpd[i] & hotplug_trigger))
+ continue;
+
+ if (dev_priv->hotplug.stats[i].state == HPD_DISABLED) {
/*
* On GMCH platforms the interrupt mask bits only
* prevent irq generation, not the setting of the
continue;
}
- if (!(hpd[i] & hotplug_trigger) ||
- dev_priv->hotplug.stats[i].state != HPD_ENABLED)
+ if (dev_priv->hotplug.stats[i].state != HPD_ENABLED)
continue;
if (!(dig_port_mask & hpd[i])) {