drm/udl: use helpers
authorRob Clark <robdclark@gmail.com>
Fri, 18 Jul 2014 03:30:01 +0000 (23:30 -0400)
committerDave Airlie <airlied@redhat.com>
Fri, 18 Jul 2014 04:24:49 +0000 (14:24 +1000)
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/udl/udl_connector.c

index dea38ab6c47d1a50761dc2d5911a76d7fae6e09f..e026a9e2942a249c1e6914ae6ba12a8f9c4be37c 100644 (file)
@@ -105,14 +105,7 @@ static struct drm_encoder*
 udl_best_single_encoder(struct drm_connector *connector)
 {
        int enc_id = connector->encoder_ids[0];
-       struct drm_mode_object *obj;
-       struct drm_encoder *encoder;
-
-       obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER);
-       if (!obj)
-               return NULL;
-       encoder = obj_to_encoder(obj);
-       return encoder;
+       return drm_encoder_find(connector->dev, enc_id);
 }
 
 static int udl_connector_set_property(struct drm_connector *connector,