summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bochs
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-07-17 23:29:57 -0400
committerDave Airlie <airlied@redhat.com>2014-07-18 14:24:28 +1000
commitfc22d96d152d7f867ac08bcd36ffcb59e1cbfb43 (patch)
tree785d5650b62234c9e7250feb0dbe0376ba31c7bc /drivers/gpu/drm/bochs
parent70e2626005fb21f95d1056bd0eae8d5e540d16ac (diff)
downloadblackbird-op-linux-fc22d96d152d7f867ac08bcd36ffcb59e1cbfb43.tar.gz
blackbird-op-linux-fc22d96d152d7f867ac08bcd36ffcb59e1cbfb43.zip
drm/bochs: use helpers
Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/bochs')
-rw-r--r--drivers/gpu/drm/bochs/bochs_kms.c13
1 files changed, 2 insertions, 11 deletions
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;
}
OpenPOWER on IntegriCloud