Commit 70e26260 authored by Rob Clark's avatar Rob Clark Committed by Dave Airlie

drm/ast: use helpers

Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 62eb3e20
...@@ -667,17 +667,9 @@ static void ast_encoder_destroy(struct drm_encoder *encoder) ...@@ -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) static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector)
{ {
int enc_id = connector->encoder_ids[0]; int enc_id = connector->encoder_ids[0];
struct drm_mode_object *obj;
struct drm_encoder *encoder;
/* pick the encoder ids */ /* pick the encoder ids */
if (enc_id) { if (enc_id)
obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER); return drm_encoder_find(connector->dev, enc_id);
if (!obj)
return NULL;
encoder = obj_to_encoder(obj);
return encoder;
}
return NULL; return NULL;
} }
......
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