drm/hisilicon: Make kirin_drm_unbind sufficient
authorXinliang Liu <xinliang.liu@linaro.org>
Sun, 8 May 2016 09:48:55 +0000 (17:48 +0800)
committerXinliang Liu <xinliang.liu@linaro.org>
Wed, 11 May 2016 11:05:36 +0000 (19:05 +0800)
Remove deprecated drm_put_dev.
Clean up everything needed in unbind.
Thanks to Daniel Vetter, this issue is reported by him.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reported-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c

index bc410ee584b725580c68b911693b47b32b2a260f..3f94785fbcca6fe6dde61c77815f7dcc3a22acc7 100644 (file)
@@ -244,7 +244,12 @@ err_drm_dev_unref:
 
 static void kirin_drm_unbind(struct device *dev)
 {
-       drm_put_dev(dev_get_drvdata(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);
 }
 
 static const struct component_master_ops kirin_drm_ops = {