aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-07-17 23:29:56 -0400
committerDave Airlie <airlied@redhat.com>2014-07-18 00:24:21 -0400
commit70e2626005fb21f95d1056bd0eae8d5e540d16ac (patch)
tree5ee566831de3ddb4034242985f15ab73b4ad9ade
parent62eb3e20f8f3ca9de4a17f87effe534d6a691176 (diff)
drm/ast: use helpers
Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/ast/ast_mode.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 9896286ed262..5389350244f2 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -667,17 +667,9 @@ static void ast_encoder_destroy(struct drm_encoder *encoder)
667static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector) 667static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector)
668{ 668{
669 int enc_id = connector->encoder_ids[0]; 669 int enc_id = connector->encoder_ids[0];
670 struct drm_mode_object *obj;
671 struct drm_encoder *encoder;
672
673 /* pick the encoder ids */ 670 /* pick the encoder ids */
674 if (enc_id) { 671 if (enc_id)
675 obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER); 672 return drm_encoder_find(connector->dev, enc_id);
676 if (!obj)
677 return NULL;
678 encoder = obj_to_encoder(obj);
679 return encoder;
680 }
681 return NULL; 673 return NULL;
682} 674}
683 675