drm/hisilicon: Remove redundant calls to drm_connector_register_all()
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 17 Jun 2016 08:25:20 +0000 (09:25 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 21 Jun 2016 08:53:13 +0000 (10:53 +0200)
Up to now, the recommendation was for drivers to call drm_dev_register()
followed by drm_connector_register_all(). Now that
drm_connector_register() is safe against multiple invocations, we can
move drm_connector_register_all() to drm_dev_register() and not suffer
from any backwards compatibility issues with drivers not following the
more rigorous init ordering.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Cc: Chen Feng <puck.chen@hisilicon.com>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1466151923-1572-5-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c

index 193657259ee9ff205c8dc8b01f6ece0dddd9e78e..ef2c32ec16168e51f4cdfc0c152a5e114bf837c6 100644 (file)
@@ -221,19 +221,12 @@ static int kirin_drm_bind(struct device *dev)
        if (ret)
                goto err_kms_cleanup;
 
-       /* connectors should be registered after drm device register */
-       ret = drm_connector_register_all(drm_dev);
-       if (ret)
-               goto err_drm_dev_unregister;
-
        DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n",
                 driver->name, driver->major, driver->minor, driver->patchlevel,
                 driver->date, drm_dev->primary->index);
 
        return 0;
 
-err_drm_dev_unregister:
-       drm_dev_unregister(drm_dev);
 err_kms_cleanup:
        kirin_drm_kms_cleanup(drm_dev);
 err_drm_dev_unref:
@@ -246,7 +239,6 @@ static void kirin_drm_unbind(struct device *dev)
 {
        struct drm_device *drm_dev = dev_get_drvdata(dev);
 
-       drm_connector_unregister_all(drm_dev);
        drm_dev_unregister(drm_dev);
        kirin_drm_kms_cleanup(drm_dev);
        drm_dev_unref(drm_dev);