[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1461068693-11260-3-git-send-email-abrodkin@synopsys.com>
Date: Tue, 19 Apr 2016 15:24:52 +0300
From: Alexey Brodkin <Alexey.Brodkin@...opsys.com>
To: dri-devel@...ts.freedesktop.org
Cc: linux-kernel@...r.kernel.org,
Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Boris Brezillon <boris.brezillon@...e-electrons.com>
Subject: [PATCH 2/3 v6] drm: atmel_hldc: Use generic drm_connector_register_all() helper
This driver used to have its own implementation of connector_register_all()
which actually was taken as a prototype of drm_connector_register_all().
Now when drm_connector_register_all() exists reusing it here.
Signed-off-by: Alexey Brodkin <abrodkin@...opsys.com>
Cc: Daniel Vetter <daniel@...ll.ch>
Cc: David Airlie <airlied@...ux.ie>
Cc: Boris Brezillon <boris.brezillon@...e-electrons.com>
---
Changes v5 -> v6:
* Only substitute its own atmel_hlcdc_dc_connector_plug_all().
drm_connector_unregister_all() is already used there since
222b90943446 "drm/atmel: Fixup drm_connector_/unplug/unregister/_all"
No changes v4 -> v5.
No changes v3 -> v4.
Changes v2 -> v3:
* Updated title with capital after colon
* Added ack from Boris
No changes v1 -> v2.
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 30 +---------------------------
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index 8ab4318..9907dd1 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -584,34 +584,6 @@ static void atmel_hlcdc_dc_unload(struct drm_device *dev)
destroy_workqueue(dc->wq);
}
-static int atmel_hlcdc_dc_connector_plug_all(struct drm_device *dev)
-{
- struct drm_connector *connector, *failed;
- int ret;
-
- mutex_lock(&dev->mode_config.mutex);
- list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
- ret = drm_connector_register(connector);
- if (ret) {
- failed = connector;
- goto err;
- }
- }
- mutex_unlock(&dev->mode_config.mutex);
- return 0;
-
-err:
- list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
- if (failed == connector)
- break;
-
- drm_connector_unregister(connector);
- }
- mutex_unlock(&dev->mode_config.mutex);
-
- return ret;
-}
-
static void atmel_hlcdc_dc_connector_unplug_all(struct drm_device *dev)
{
mutex_lock(&dev->mode_config.mutex);
@@ -736,7 +708,7 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
if (ret)
goto err_unload;
- ret = atmel_hlcdc_dc_connector_plug_all(ddev);
+ ret = drm_connector_register_all(ddev);
if (ret)
goto err_unregister;
--
2.5.5
Powered by blists - more mailing lists