diff options
author | Rob Clark <robdclark@gmail.com> | 2014-07-17 23:29:58 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-07-18 00:24:31 -0400 |
commit | ef13aec45406b31969571f9cb3872a2654d06a66 (patch) | |
tree | 24c90200d1e9be3dd77ddacd1995c6a20605d765 /drivers/gpu/drm/cirrus/cirrus_mode.c | |
parent | fc22d96d152d7f867ac08bcd36ffcb59e1cbfb43 (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/cirrus_mode.c')
-rw-r--r-- | drivers/gpu/drm/cirrus/cirrus_mode.c | 14 |
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 | |||
509 | *connector) | 509 | *connector) |
510 | { | 510 | { |
511 | int enc_id = connector->encoder_ids[0]; | 511 | int enc_id = connector->encoder_ids[0]; |
512 | struct drm_mode_object *obj; | ||
513 | struct drm_encoder *encoder; | ||
514 | |||
515 | /* pick the encoder ids */ | 512 | /* pick the encoder ids */ |
516 | if (enc_id) { | 513 | if (enc_id) |
517 | obj = | 514 | return drm_encoder_find(connector->dev, enc_id); |
518 | drm_mode_object_find(connector->dev, enc_id, | ||
519 | DRM_MODE_OBJECT_ENCODER); | ||
520 | if (!obj) | ||
521 | return NULL; | ||
522 | encoder = obj_to_encoder(obj); | ||
523 | return encoder; | ||
524 | } | ||
525 | return NULL; | 515 | return NULL; |
526 | } | 516 | } |
527 | 517 | ||