diff mbox series

[44/59] drm/arc: Drop surplus connector registration

Message ID 20200415074034.175360-45-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show
Series devm_drm_dev_alloc, v2 | expand

Commit Message

Daniel Vetter April 15, 2020, 7:40 a.m. UTC
drm_connector_register does nothing before drm_dev_register(), it
is meant for hotpluggable connectors only. Same for the unregister side.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/arc/arcpgu_sim.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Sam Ravnborg April 24, 2020, 4:51 p.m. UTC | #1
Hi Daniel.

On Wed, Apr 15, 2020 at 09:40:19AM +0200, Daniel Vetter wrote:
> drm_connector_register does nothing before drm_dev_register(), it
> is meant for hotpluggable connectors only. Same for the unregister side.

Strange changelog for a patch that removes two calls to
drm_connector_unregister() and nothing else.
But it is OK - so
Acked-by: Sam Ravnborg <sam@ravnborg.org>

> 
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/arc/arcpgu_sim.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arc/arcpgu_sim.c b/drivers/gpu/drm/arc/arcpgu_sim.c
> index e42fe5d05a3d..3772df1647aa 100644
> --- a/drivers/gpu/drm/arc/arcpgu_sim.c
> +++ b/drivers/gpu/drm/arc/arcpgu_sim.c
> @@ -29,7 +29,6 @@ static int arcpgu_drm_connector_get_modes(struct drm_connector *connector)
>  
>  static void arcpgu_drm_connector_destroy(struct drm_connector *connector)
>  {
> -	drm_connector_unregister(connector);
>  	drm_connector_cleanup(connector);
>  }
>  
> @@ -80,7 +79,6 @@ int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
>  	ret = drm_connector_attach_encoder(connector, encoder);
>  	if (ret < 0) {
>  		dev_err(drm->dev, "could not attach connector to encoder\n");
> -		drm_connector_unregister(connector);
>  		goto error_connector_cleanup;
>  	}
>  
> -- 
> 2.25.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/arc/arcpgu_sim.c b/drivers/gpu/drm/arc/arcpgu_sim.c
index e42fe5d05a3d..3772df1647aa 100644
--- a/drivers/gpu/drm/arc/arcpgu_sim.c
+++ b/drivers/gpu/drm/arc/arcpgu_sim.c
@@ -29,7 +29,6 @@  static int arcpgu_drm_connector_get_modes(struct drm_connector *connector)
 
 static void arcpgu_drm_connector_destroy(struct drm_connector *connector)
 {
-	drm_connector_unregister(connector);
 	drm_connector_cleanup(connector);
 }
 
@@ -80,7 +79,6 @@  int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
 	ret = drm_connector_attach_encoder(connector, encoder);
 	if (ret < 0) {
 		dev_err(drm->dev, "could not attach connector to encoder\n");
-		drm_connector_unregister(connector);
 		goto error_connector_cleanup;
 	}