Commit be2c9196 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/i915: Replace big nested if block with early return

Looks nicer.

Not functional change.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
[danvet: Add "No functional change" as requested by Jani.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 72c3500a
...@@ -1232,16 +1232,17 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp) ...@@ -1232,16 +1232,17 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)
{ {
struct drm_device *dev = intel_dp_to_dev(intel_dp); struct drm_device *dev = intel_dp_to_dev(intel_dp);
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_digital_port *intel_dig_port =
dp_to_dig_port(intel_dp);
struct intel_encoder *intel_encoder = &intel_dig_port->base;
enum intel_display_power_domain power_domain;
u32 pp; u32 pp;
u32 pp_stat_reg, pp_ctrl_reg; u32 pp_stat_reg, pp_ctrl_reg;
WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex)); WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
if (!intel_dp->want_panel_vdd && edp_have_panel_vdd(intel_dp)) { if (intel_dp->want_panel_vdd || !edp_have_panel_vdd(intel_dp))
struct intel_digital_port *intel_dig_port = return;
dp_to_dig_port(intel_dp);
struct intel_encoder *intel_encoder = &intel_dig_port->base;
enum intel_display_power_domain power_domain;
DRM_DEBUG_KMS("Turning eDP VDD off\n"); DRM_DEBUG_KMS("Turning eDP VDD off\n");
...@@ -1263,7 +1264,6 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp) ...@@ -1263,7 +1264,6 @@ static void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)
power_domain = intel_display_port_power_domain(intel_encoder); power_domain = intel_display_port_power_domain(intel_encoder);
intel_display_power_put(dev_priv, power_domain); intel_display_power_put(dev_priv, power_domain);
}
} }
static void edp_panel_vdd_work(struct work_struct *__work) static void edp_panel_vdd_work(struct work_struct *__work)
......
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