diff mbox

[3/4] drm/i915: remove redundant is_edp() check

Message ID 1398207345-1865-3-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni April 22, 2014, 10:55 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

If intel_edp_init_connector() returns false, then we know that
is_edp() is true because of the early return at
intel_edp_init_connector(). So remove the redundant check.

Change proposed by Chris on his review to "drm/i915: get power domain
in case the BIOS enabled eDP VDD".

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index b385b03..a25f708 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3958,12 +3958,10 @@  intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 
 	if (!intel_edp_init_connector(intel_dp, intel_connector, &power_seq)) {
 		drm_dp_aux_unregister_i2c_bus(&intel_dp->aux);
-		if (is_edp(intel_dp)) {
-			cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
-			mutex_lock(&dev->mode_config.mutex);
-			edp_panel_vdd_off_sync(intel_dp);
-			mutex_unlock(&dev->mode_config.mutex);
-		}
+		cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
+		mutex_lock(&dev->mode_config.mutex);
+		edp_panel_vdd_off_sync(intel_dp);
+		mutex_unlock(&dev->mode_config.mutex);
 		drm_sysfs_connector_remove(connector);
 		drm_connector_cleanup(connector);
 		return false;