drm/exynos/hdmi: unregister connector on removal
authorAndrzej Hajda <a.hajda@samsung.com>
Tue, 9 Sep 2014 13:16:13 +0000 (15:16 +0200)
committerInki Dae <daeinki@gmail.com>
Fri, 19 Sep 2014 15:56:15 +0000 (00:56 +0900)
During component removal driver should unregister connector.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_hdmi.c

index 562966db2aa13eec90a5dbf588666675f8674892..7910fb37d9bbd6df2092f0c7147d6e0a8b944875 100644 (file)
@@ -1040,6 +1040,8 @@ static enum drm_connector_status hdmi_detect(struct drm_connector *connector,
 
 static void hdmi_connector_destroy(struct drm_connector *connector)
 {
+       drm_connector_unregister(connector);
+       drm_connector_cleanup(connector);
 }
 
 static struct drm_connector_funcs hdmi_connector_funcs = {
@@ -2314,8 +2316,8 @@ static void hdmi_unbind(struct device *dev, struct device *master, void *data)
        struct drm_encoder *encoder = display->encoder;
        struct hdmi_context *hdata = display->ctx;
 
+       hdmi_connector_destroy(&hdata->connector);
        encoder->funcs->destroy(encoder);
-       drm_connector_cleanup(&hdata->connector);
 }
 
 static const struct component_ops hdmi_component_ops = {