diff options
Diffstat (limited to 'drivers/gpu/drm/ast/ast_mode.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_mode.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 114aee941d46..5389350244f2 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c | |||
@@ -667,17 +667,9 @@ static void ast_encoder_destroy(struct drm_encoder *encoder) | |||
667 | static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector) | 667 | static struct drm_encoder *ast_best_single_encoder(struct drm_connector *connector) |
668 | { | 668 | { |
669 | int enc_id = connector->encoder_ids[0]; | 669 | int enc_id = connector->encoder_ids[0]; |
670 | struct drm_mode_object *obj; | ||
671 | struct drm_encoder *encoder; | ||
672 | |||
673 | /* pick the encoder ids */ | 670 | /* pick the encoder ids */ |
674 | if (enc_id) { | 671 | if (enc_id) |
675 | obj = drm_mode_object_find(connector->dev, enc_id, DRM_MODE_OBJECT_ENCODER); | 672 | return drm_encoder_find(connector->dev, enc_id); |
676 | if (!obj) | ||
677 | return NULL; | ||
678 | encoder = obj_to_encoder(obj); | ||
679 | return encoder; | ||
680 | } | ||
681 | return NULL; | 673 | return NULL; |
682 | } | 674 | } |
683 | 675 | ||
@@ -829,7 +821,7 @@ static void ast_connector_destroy(struct drm_connector *connector) | |||
829 | { | 821 | { |
830 | struct ast_connector *ast_connector = to_ast_connector(connector); | 822 | struct ast_connector *ast_connector = to_ast_connector(connector); |
831 | ast_i2c_destroy(ast_connector->i2c); | 823 | ast_i2c_destroy(ast_connector->i2c); |
832 | drm_sysfs_connector_remove(connector); | 824 | drm_connector_unregister(connector); |
833 | drm_connector_cleanup(connector); | 825 | drm_connector_cleanup(connector); |
834 | kfree(connector); | 826 | kfree(connector); |
835 | } | 827 | } |
@@ -871,7 +863,7 @@ static int ast_connector_init(struct drm_device *dev) | |||
871 | connector->interlace_allowed = 0; | 863 | connector->interlace_allowed = 0; |
872 | connector->doublescan_allowed = 0; | 864 | connector->doublescan_allowed = 0; |
873 | 865 | ||
874 | drm_sysfs_connector_add(connector); | 866 | drm_connector_register(connector); |
875 | 867 | ||
876 | connector->polled = DRM_CONNECTOR_POLL_CONNECT; | 868 | connector->polled = DRM_CONNECTOR_POLL_CONNECT; |
877 | 869 | ||