Use drmm_plain_encoder_alloc() to allocate simple encoder and
drmm_writeback_connector_init() in order to initialize writeback
connector instance.

Reviewed-by: Louis Chauvet <[email protected]>
Reviewed-by: Suraj Kandpal <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 drivers/gpu/drm/vc4/vc4_txp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c
index 9082902100e4..befdb094c173 100644
--- a/drivers/gpu/drm/vc4/vc4_txp.c
+++ b/drivers/gpu/drm/vc4/vc4_txp.c
@@ -378,7 +378,6 @@ vc4_txp_connector_detect(struct drm_connector *connector, 
bool force)
 static const struct drm_connector_funcs vc4_txp_connector_funcs = {
        .detect = vc4_txp_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .destroy = drm_connector_cleanup,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
        .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
@@ -602,10 +601,10 @@ static int vc4_txp_bind(struct device *dev, struct device 
*master, void *data)
 
        drm_connector_helper_add(&txp->connector.base,
                                 &vc4_txp_connector_helper_funcs);
-       ret = drm_writeback_connector_init_with_encoder(drm, &txp->connector,
-                                                       encoder,
-                                                       
&vc4_txp_connector_funcs,
-                                                       drm_fmts, 
ARRAY_SIZE(drm_fmts));
+       ret = drmm_writeback_connector_init(drm, &txp->connector,
+                                           &vc4_txp_connector_funcs,
+                                           encoder,
+                                           drm_fmts, ARRAY_SIZE(drm_fmts));
        if (ret)
                return ret;
 

-- 
2.47.3

Reply via email to