]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/ast: use helpers
authorRob Clark <robdclark@gmail.com>
Fri, 18 Jul 2014 03:29:56 +0000 (23:29 -0400)
committerDave Airlie <airlied@redhat.com>
Fri, 18 Jul 2014 04:24:21 +0000 (14:24 +1000)
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ast/ast_mode.c

index 9896286ed262d867e8e0f0138a7128ffca4f7a88..5389350244f216fac07c5d98723ee2632c627e89 100644 (file)
@@ -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;
 }