diff options
author | Rob Clark <robdclark@gmail.com> | 2014-07-18 07:30:00 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-07-18 08:24:39 +0400 |
commit | c7e951147d92319e1d2477628abfa36f277f887e (patch) | |
tree | a3a6299483b4bea945243f688c061501d89a5866 /drivers/gpu/drm/mgag200 | |
parent | 4726f1ff50e8da000a9af7bfbdb3af54d39a17bd (diff) | |
download | linux-c7e951147d92319e1d2477628abfa36f277f887e.tar.xz |
drm/mgag200: use helpers
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/mgag200')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_mode.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index f9fe390920f1..45f04dea0ac2 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; } |