From: Rob Clark Date: Fri, 18 Jul 2014 03:29:57 +0000 (-0400) Subject: drm/bochs: use helpers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fc22d96d152d7f867ac08bcd36ffcb59e1cbfb43;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/bochs: use helpers Signed-off-by: Rob Clark Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index dcf2e55f4ae9..b3c61307093e 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -216,18 +216,9 @@ static struct drm_encoder * bochs_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; }