]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/mgag200: use helpers
authorRob Clark <robdclark@gmail.com>
Fri, 18 Jul 2014 03:30:00 +0000 (23:30 -0400)
committerDave Airlie <airlied@redhat.com>
Fri, 18 Jul 2014 04:24:39 +0000 (14:24 +1000)
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/mgag200/mgag200_mode.c

index f9fe390920f1446d9970c69822b2173989ce6f1a..45f04dea0ac2ad9f3f37847251e15b4fb0d09e80 100644 (file)
@@ -1562,19 +1562,9 @@ static struct drm_encoder *mga_connector_best_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;
 }