Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/ast: use helpers

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Rob Clark and committed by
Dave Airlie
70e26260 62eb3e20

+2 -10
+2 -10
drivers/gpu/drm/ast/ast_mode.c
··· 667 667 static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector) 668 668 { 669 669 int enc_id = connector->encoder_ids[0]; 670 - struct drm_mode_object *obj; 671 - struct drm_encoder *encoder; 672 - 673 670 /* pick the encoder ids */ 674 - if (enc_id) { 675 - obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER); 676 - if (!obj) 677 - return NULL; 678 - encoder = obj_to_encoder(obj); 679 - return encoder; 680 - } 671 + if (enc_id) 672 + return drm_encoder_find(connector->dev, enc_id); 681 673 return NULL; 682 674 } 683 675