From: Rob Clark Date: Fri, 18 Jul 2014 03:30:00 +0000 (-0400) Subject: drm/mgag200: use helpers X-Git-Tag: v3.17-rc1~82^2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7e951147d92319e1d2477628abfa36f277f887e;p=platform%2Fkernel%2Flinux-exynos.git drm/mgag200: use helpers Signed-off-by: Rob Clark Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index f9fe390..45f04de 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -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; }