From: Rob Clark Date: Fri, 18 Jul 2014 03:30:01 +0000 (-0400) Subject: drm/udl: use helpers X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bf02d87fa458a665c176eaefd58d29bc615a8875;p=linux-beck.git drm/udl: use helpers Signed-off-by: Rob Clark Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c index dea38ab6c47d..e026a9e2942a 100644 --- a/drivers/gpu/drm/udl/udl_connector.c +++ b/drivers/gpu/drm/udl/udl_connector.c @@ -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,