diff options
author | Rob Clark <robdclark@gmail.com> | 2014-07-17 23:29:56 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-07-18 14:24:21 +1000 |
commit | 70e2626005fb21f95d1056bd0eae8d5e540d16ac (patch) | |
tree | 5ee566831de3ddb4034242985f15ab73b4ad9ade /drivers/gpu/drm | |
parent | 62eb3e20f8f3ca9de4a17f87effe534d6a691176 (diff) | |
download | linux-70e2626005fb21f95d1056bd0eae8d5e540d16ac.tar.gz linux-70e2626005fb21f95d1056bd0eae8d5e540d16ac.tar.bz2 linux-70e2626005fb21f95d1056bd0eae8d5e540d16ac.zip |
drm/ast: use helpers
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/ast/ast_mode.c | 12 |
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) static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector) { int enc_id = connector->encoder_ids[0]; - struct drm_mode_object *obj; - struct drm_encoder *encoder; - /* pick the encoder ids */ - if (enc_id) { - obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER); - if (!obj) - return NULL; - encoder = obj_to_encoder(obj); - return encoder; - } + if (enc_id) + return drm_encoder_find(connector->dev, enc_id); return NULL; } |