]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: use enc_to_intel_dp() instead of opencoding the same
authorImre Deak <imre.deak@intel.com>
Wed, 8 May 2013 10:14:02 +0000 (13:14 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 May 2013 19:56:38 +0000 (21:56 +0200)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_drv.h

index 6096871c4806daac1ad6fd6bbeee31f605fdb1a7..b1f50b15c6f3e02eb7d3a9d035255c015e02f4d3 100644 (file)
@@ -620,19 +620,17 @@ static inline struct intel_encoder *intel_attached_encoder(struct drm_connector
        return to_intel_connector(connector)->encoder;
 }
 
-static inline struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder)
-{
-       struct intel_digital_port *intel_dig_port =
-               container_of(encoder, struct intel_digital_port, base.base);
-       return &intel_dig_port->dp;
-}
-
 static inline struct intel_digital_port *
 enc_to_dig_port(struct drm_encoder *encoder)
 {
        return container_of(encoder, struct intel_digital_port, base.base);
 }
 
+static inline struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder)
+{
+       return &enc_to_dig_port(encoder)->dp;
+}
+
 static inline struct intel_digital_port *
 dp_to_dig_port(struct intel_dp *intel_dp)
 {