summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/hisilicon
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-05-06 10:28:41 +0200
committerXinliang Liu <xinliang.liu@linaro.org>2016-05-11 19:05:35 +0800
commitb93c846273b9eda820f618a07d8871e20639e0b9 (patch)
tree9733576aacfa0309474390a3288f70d2840726ea /drivers/gpu/drm/hisilicon
parent2e726dc4b4e2dd3ae3fe675f9d3af88a2d593ee1 (diff)
drm/hisilicon: Use drm_connector_register_all
Use drm_connector_register_all helper to register connectors. Cc: Xinliang Liu <xinliang.liu@linaro.org> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/hisilicon')
-rw-r--r--drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c31
1 files changed, 1 insertions, 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 e102c9e1e7b2..bc410ee584b7 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;