summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/cirrus
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-07-17 23:29:58 -0400
committerDave Airlie <airlied@redhat.com>2014-07-18 14:24:31 +1000
commitef13aec45406b31969571f9cb3872a2654d06a66 (patch)
tree24c90200d1e9be3dd77ddacd1995c6a20605d765 /drivers/gpu/drm/cirrus
parentfc22d96d152d7f867ac08bcd36ffcb59e1cbfb43 (diff)
drm/cirrus: use helpers
Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/cirrus')
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_mode.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index 49332c5fe35b..e1c5c3222129 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -509,19 +509,9 @@ static struct drm_encoder *cirrus_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;
}