[PATCH] drm/hisilicon: Use drm_connector_register_all
Xinliang Liu
xinliang.liu at linaro.org
Sun May 8 08:35:39 UTC 2016
Hi Daniel,
On 6 May 2016 at 16:28, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> Also, the unbind function is totally not sufficient, and it's calling
> the deprecated drm_put_dev. Please look at what other drivers are
> doing and fix things up.
will fix these things and send patch for review soon.
Thanks,
-xinliang
>
> Cc: Xinliang Liu <xinliang.liu at linaro.org>
> Cc: Xinwei Kong <kong.kongxinwei at hisilicon.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 31 +------------------------
> 1 file changed, 1 insertion(+), 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> index e6b9e40ced7d..cd3bcb048081 100644
> --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c
> @@ -201,35 +201,6 @@ static int compare_of(struct device *dev, void *data)
> return dev->of_node == data;
> }
>
> -static int kirin_drm_connectors_register(struct drm_device *dev)
> -{
> - struct drm_connector *connector;
> - struct drm_connector *failed_connector;
> - int ret;
> -
> - mutex_lock(&dev->mode_config.mutex);
> - drm_for_each_connector(connector, dev) {
> - ret = drm_connector_register(connector);
> - if (ret) {
> - failed_connector = connector;
> - goto err;
> - }
> - }
> - mutex_unlock(&dev->mode_config.mutex);
> -
> - return 0;
> -
> -err:
> - drm_for_each_connector(connector, dev) {
> - if (failed_connector == connector)
> - break;
> - drm_connector_unregister(connector);
> - }
> - mutex_unlock(&dev->mode_config.mutex);
> -
> - return ret;
> -}
> -
> static int kirin_drm_bind(struct device *dev)
> {
> struct drm_driver *driver = &kirin_drm_driver;
> @@ -251,7 +222,7 @@ static int kirin_drm_bind(struct device *dev)
> goto err_kms_cleanup;
>
> /* connectors should be registered after drm device register */
> - ret = kirin_drm_connectors_register(drm_dev);
> + ret = drm_connector_register_all(drm_dev);
> if (ret)
> goto err_drm_dev_unregister;
>
> --
> 2.8.1
>
More information about the dri-devel
mailing list